Hardi
asked on
VS .NET: Connecting to MySQL
I would like to connect to a MySQL database from VS .NET.
The MySQL server is on another computer, connected in LAN.
I have tried various ways but failed to do it because I don't really understand the concept.
(For Delphi programmers)
I can do it in Delphi, quite simple:
- Drop a TDatabase, set AliasName to testdb (In BDE, the type is MySQL ODBC 3.51 Driver), and DatabaseName to testdb (this is the database in the MySQL server, not to be confused with the previous one).
- Drop a TQuery, setting DatabaseName to testdb, SQL to "select * from tb_customer"
- Drop a TDataSource and a TDBGrid, setting their DataSet and DataSource
- Activate/enable all of them, and the data in table tb_customer is already shown without even compiling/running it.
How can I do the same thing in VS .NET?
Thank you.
The MySQL server is on another computer, connected in LAN.
I have tried various ways but failed to do it because I don't really understand the concept.
(For Delphi programmers)
I can do it in Delphi, quite simple:
- Drop a TDatabase, set AliasName to testdb (In BDE, the type is MySQL ODBC 3.51 Driver), and DatabaseName to testdb (this is the database in the MySQL server, not to be confused with the previous one).
- Drop a TQuery, setting DatabaseName to testdb, SQL to "select * from tb_customer"
- Drop a TDataSource and a TDBGrid, setting their DataSet and DataSource
- Activate/enable all of them, and the data in table tb_customer is already shown without even compiling/running it.
How can I do the same thing in VS .NET?
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can use this driver http://sourceforge.net/project/showfiles.php?group_id=63165&package_id=60849
ASKER