Connecting to MySql DB from a .NET app

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ypytt
    New Member
    • Jul 2008
    • 8

    Connecting to MySql DB from a .NET app

    Hi all,
    I'm developing a Windows application in C# using Visual Studio 2005. The application should be able to read data from a MySql database. I've developed applications that read data from a Microsoft Sql Server database, using the System.Data.Sql Client namespace. My question is, does this work for MySql? And if not, what should I use? I want to keep my database connectivity simple, only executing querries and maybe stored procedures.
    I'm a new to MySql so please help :)
  • coolsti
    Contributor
    • Mar 2008
    • 310

    #2
    You can certainly do this. I have just learned how to do it myself recently.

    Go to the online mysql documentation and look for a connector. I think this is the one:

    http://dev.mysql.com/doc/refman/5.0/en/connector-net.html

    You just install it on your computer (or any computer that will use your C# application) and you have the libraries you need. You then use the appropriate using statements, like for example:

    using MySql;
    using MySql.Data;
    using MySql.Data.MySq lClient;

    and then there you go.

    Comment

    Working...