|
#7楼 得分:5回复于:2009-01-09 20:57:46
using MySQLDriverCS; MySQLConnection DBConn; DBConn = new MySQLConnection(new MySQLConnectionString("localhost","mysql","root","",3306).AsString); DBConn.Open(); MySQLCommand DBComm; DBComm = new MySQLCommand("select AA from A",DBConn); MySQLDataReader DBReader = DBComm.ExecuteReaderEx(); try { while (DBReader.Read()) { Console.WriteLine("AA= {0} ", DBReader.GetString(0)); } } finally { DBReader.Close(); DBConn.Close(); } DBConn.Close();
|
|
|