How to databind to a mysql database in vs2005 using basic/ or c#

G

garyusenet

Hello,

I know how to create a mysql database and open it in code.

I don't know how to databind to it.

i have a simple form with 5 controls text controls. I want to enter
text into the controls, and write this text to a corresponding column
in the mysql database.

how do i do this please?

Thanks,
Gary.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

You bind your controls to an IList , this interface is implemented by
DataSet , so one solution is fill your dataset ( by using DataAdapter.Fill )
and then just bind it to your control.
Another possibility is using the DataReader , if you are just displaying the
info and do not need to keep it in memory just the IDataReader
implementation, just remember to close it after you are done with it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top