项目中增加引用 MYSQL 代码中using MySql.Data.MySQLClient; 你大小写没错吧?
把MySQLDriverCS.dll添加到.net的组件面板 using MySQLDriverCS;MySQLConnection conn = new MySQLConnection( new MySQLConnectionString("localhost","","root","").AsString ); conn.Open(); MySQLCommand cmd; cmd = new MySQLDriverCS.MySQLCommand("",conn);
MySQLDriverCS.dll.把它添加到.net的组件面板里 下面是创建一个数据库链接: using MySQLDriverCS; MySQLConnection conn = new MySQLConnection( new MySQLConnectionString("localhost","test","root","").AsString ); conn.Open();
代码中using MySql.Data.MySQLClient;
你大小写没错吧?
using MySQLDriverCS;MySQLConnection conn = new MySQLConnection( new MySQLConnectionString("localhost","","root","").AsString );
conn.Open();
MySQLCommand cmd;
cmd = new MySQLDriverCS.MySQLCommand("",conn);
下面是创建一个数据库链接: using MySQLDriverCS; MySQLConnection conn = new MySQLConnection( new MySQLConnectionString("localhost","test","root","").AsString ); conn.Open();