在.NET访问MySQL数据库经验总结

复制string connstr=Setting.Instance().GetConnectionString("MySQL"); MySQLConnection conn =newMySQLConnection(connstr); conn.Open(); string query = "insert into myfirst(Id,数据Name) values(?Id,?Name)"; MySQLCommand cmd = newMySQLCommand(query, conn); MySQLParameter para1=newMySQLParameter("?Id",DbType.Int32); 1.2.3.4.5.6.