Solved

VS .NET: Connecting to MySQL

Posted on 2006-11-12
3
265 Views
Last Modified: 2010-04-16
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.
0
Comment
Question by:Hardi
3 Comments
 
LVL 4

Accepted Solution

by:
boy8964 earned 250 total points
ID: 17928096
When I first time connecting .net to mysql, I could not do it utill I have readed this article. url is here:
http://dev.mysql.com/tech-resources/articles/dotnet/

It may help you to.
0
 
LVL 6

Author Comment

by:Hardi
ID: 17928214
Thank you. I'll try it later
0
 
LVL 6

Expert Comment

by:so3
ID: 17928331
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now