1. Download and install the latest .NET Framework SDK.
2. Install Microsoft Data Access Components (MDAC) 2.6 or later. MDAC 2.8 is the latest and is recommended.
3. Install the ODBC.NET Provider. Note that this step is only necessary if you are building applications using .NET 1.0. The ODBC provider comes standard with .NET 1.1. S;q319243.
4. Install MySQL Server. For more information on how to install and setup the MySQL Server, refer to the Installation chapter of the MySQL Reference Manual.
5. Now install MySQL ODBC Driver-MyODBC 3.51; and for installation instructions, refer to the Installation section of the Connector/ODBC documentation.
6. Setup an MyODBC DSN to be used for connecting to MySQL by following the instructions in the "DSN on Windows" section of the Connector/ODBC documentation.
http://dev.mysql.com/tech-resources/articles/dotnet/
For example source code to connect MySQL on C#
using System.Data.Odbc;
OdbcConnection MyConnection = new OdbcConnection("DSN=MyDNSName");
MyConnection.Open();
// If you want to customize your new DNS use this example code
string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" + "SERVER=localhost;" + "DATABASE=test;" + "UID=venu;" + "PASSWORD=venu;" + "OPTION=3";
OdbcConnection MyConnection = new OdbcConnection(MyConString);
MyConnection.Open();
link http://dev.mysql.com/tech-resources/articles/dotnet/
simple example query link
http://www.easysoft.com/developer/languages/csharp/ado-net-odbc.html#example
Sunday, October 7, 2007
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment