Today, I am mainly talking about the correct operation process for connecting to the MySQL database in asp.net. We all know that the process of connecting to the MySQL database in asp.net is not complicated, is there any way we use ELE. Me? The following is the detailed description of the article. I recently tried to use asp. net1.1 to connect to MySQL. It turns out that MySQL itself provides
Today, I am mainly talking about the correct operation process for connecting to the MySQL database in asp.net. We all know that the process of connecting to the MySQL database in asp.net is not complicated, is there any way we use ELE. Me? The following is the detailed description of the article. Recently I tried to use asp.net 1.1 to connect to MySQL. It turns out that MySQL itself provides
Today, I am mainly talking about the correct operation process for connecting to the MySQL database in asp.net. We all know that the process of connecting to the MySQL database in asp.net is not complicated, is there any way we use ELE. Me? The following is the detailed description of the article.
Recently I tried to use asp.net 1.1 to connect to MySQL. I found that MySQL itself provides provider (), downloaded it from the above address, and then installed SETUP, which is very simple and also contains SAMPLE.
When using the SDK, you must first provide the FOR version. . NET 1.0, 1.1) References its DLL. The simple code is as follows, which is similar to that of common data. sqlclient.
Using MySQL. Data. MySQLClient;
........
MySQLConnection myConnection = new MySQLConnection ("server = localhost; user id = root; password = XXXX; database = baby ");
String SQL = "select * from admin ";
MySQLDataAdapter myda = new MySQLDataAdapter (SQL, myConnection );
DataSet mydataset = new DataSet ();
Myda. Fill (mydataset, "admin ");
Mydatagrid. DataSource = mydataset;
Mydatagrid. DataBind ();
Is it easy?
The above content is an introduction to connecting to MySQL in asp.net. I hope you will have some gains.