954,549 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

ComboBox Text into SQL Database with ADO.NET

Hey,

Well I go this problem, I'm using ADO.NET to manage my database on a project now the problem is that I need to get the values from an external Binding source and when I click save they will be saved in the database I'm using at that moment; for example:

I got my database Games:

id 1
game call of duty

and my database Players

id 1
player roy
game -----

In my players form I got a bindingnavigator bar, a textbox for players but I want to get a ComboBox that retrives information from games and save it into players with the same bindingnavigator save button.

Thanks in advance.

scwolf
Newbie Poster
2 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

oh wow.. =( I guess no one is able to help me.

scwolf
Newbie Poster
2 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

use a data reader
ex:
while (drResult.read())
x = drResult("id").toString()

end
drResult.close()

of course you must use a stored procedure in order to retrieve the info in a particular table

vsa000
Newbie Poster
20 posts since Oct 2009
Reputation Points: 11
Solved Threads: 4
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You