MySQL and. Net2.0 with _php Tutorials

Source: Internet
Author: User
Tags odbc connection
MySQL is now the latest version of 5.x. First contact it was in sophomore time, with PHP, then it seemed to be the 4.x version.
Mysql5 adds a lot of new features to start supporting: stored procedures, triggers, views, information schema views, etc...
MySQL in the installation as always the more complex, often is a failure of the hint, there is no other reason.
This is an article comparing MySQL and SQL Server, http://htm.winsteps.net/database/331.htm
MySQL Chinese website http://www.mysql.cn/very little information, mostly installation help.
To check the information or go to the MySQL website http://www.mysql.com/.
MySQL now has the various connection tools available (http://dev.mysql.com/downloads/connector/), which can be used under. Net with Connector/odbc and connector/net.
ODBC connection efficiency may be slightly lower, preferably net direct connection
This article describes the various connection methods http://www.mysql.com/news-and-events/press-release/release_2002_10.html
1:ODBC Connection
Now the version is 3.51, after installation, you can do this:
String Constr = "DRIVER = {MySQL ODBC 3.51 DRIVER}; SERVER = localhost; DATABASE =test; UID = root; password=; ";
String constr = "Driver={mysql ODBC 3.51 DRIVER}; Server=localhost;database=test; User=root; password=;option=3; ";
String Constr = "Provider = MySQL ODBC 3.51 Driver; SERVER = localhost; DATABASE =test; UID = root; password=; ";
Try
{
OleDbConnection connection = new OleDbConnection (CONSTR);
Connection. Open ();
}
catch (Exception ex)
{
MessageBox.Show (ex. Message);
}
2:net Connection:
MySQL Connector Net 1.0.7: There are net1.0;net.1;net2.0;mono1.0 four versions of Connector. Free
Corelab.mysql 3.5: This is a commercial version with a trial period of 30 days.
The code below is an example of using MySQL Connector Net. Note: The prefix of his parameter is "? "Instead of" @ ". The problem is quite special. Corelab inside the parameter prefix is "@".

http://www.bkjia.com/PHPjc/631036.html www.bkjia.com true http://www.bkjia.com/PHPjc/631036.html techarticle MySQL is now the latest version of 5.x. First contact it was in sophomore time, with PHP, then it seemed to be the 4.x version. Mysql5 adds a lot of new features to start supporting: stored procedures, triggering ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.