Link to home
Start Free TrialLog in
Avatar of Hardi
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.
ASKER CERTIFIED SOLUTION
Avatar of boy8964
boy8964

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Hardi
Hardi

ASKER

Thank you. I'll try it later