How to use MySQL and. Net2.0 together _ PHP Tutorial

Source: Internet
Author: User
Tags odbc connection
MySQL and. Net2.0 are used in combination. The latest version of MySql is 5.x. the first time I came into contact with MySql, I used php when I was in my sophomore year. it seems that I still had Version 4.x. Mysql5 adds many new features and starts to support: stored procedures, triggering MySql. The latest version is 5. x. the first time I came into contact with php in my sophomore year, it seemed like I was still 4. version x.
Mysql5 has added many new features to support stored procedures, triggers, views, and information architecture views...
The installation of MySql is as complex as ever. it is often a failure prompt and there is no other cause.
This is an article comparing MySql and SqlServer, http://htm.winsteps.net/database/331.htm
The MySql Chinese website http://www.mysql.cn/contains a small amount of information, which may be an installation helper.
To query the information, go to the MySql website http://www.mysql.com /.
MySql now provides a variety of connection tools (http://dev.mysql.com/downloads/connector/),. net can be used under the Connector/ODBC and Connector/Net.
ODBC Connection efficiency may be slightly lower. it is best to use Net direct connection.
This article introduces various connection methods http://www.mysql.com/news-and-events/press-release/release_2002_10.html
1: ODBC Connection
The current version is 3.51. after installation, you can perform the following operations:
// 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 four versions of connector: net1.0, net.1, net2.0, and mono1.0. Free
CoreLab. MySql 3.5: this is a commercial version with a trial period of 30 days.
The following code is an example of using MySQL Connector Net. Note: his Parameter prefix is "?" Instead of "@". This problem is special. The prefix of Parameter in CoreLab is "@".

Bytes. Mysql5 adds many new features and starts to support: stored procedures, triggering...

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.