Solved

VS .NET: Connecting to MySQL

Posted on 2006-11-12
3
269 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASP.NET(C#) Eliminating weekends from a date range 2 54
Coding for the first time 9 70
C# DataTable (in memory) vs SQL Lookups 4 37
Need help with another query 10 39
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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