how will connect sqlserver 2000/2005 in visual basic 6.0
2 textbox fname and lastname
and and one combobox which will u select city and store in ur sql server.please help me
Networks
2 textbox fname and lastname
and and one combobox which will u select city and store in ur sql server.please help me
by tahir khan Accepted solution
by tony hopkinson Accepted solution
To create a connection instantiate an ADODB.Connection obect set the connection string and open it.
To run a query you instantiate an ADODB.Command object, set it's command text to the required SQl, attach to the connection, call it execute method, and it will return and ADO result set.
To pick up the data you iterate through the result set with, grab the values thought the Fields property and then add them to some form of internal store and then populate teh combo.items, or direct to the combobox Items property.
If none of this makes sense to you, go back to class or start turning up. I mean this is like Very Basic, and someone with your claimed role, a book or google should be able to get their head round the basics in a day.
This discussion is closed to new replies.
Sort by Trending