连接mysql求解
Dim conn As MySql.Data.MySqlClient.MySqlConnection
Dim cmd As MySql.Data.MySqlClient.MySqlCommand
Dim dt As DataTable
Dim connStr As String = "server="+Vars("zw_ip") +"; port=3306; user id=root; password=Aa1234qwer; database=zdjks; Allow Zero Datetime=True"
conn = New MySql.Data.MySqlClient.MySqlConnection(connStr)
conn.Open
cmd = new MySql.Data.MySqlClient.MySqlCommand("sele ct adminssionid,cardid from examinee where ordid= '" & oid & "' ", conn)
dt = cmd.ExecuteReader()
编译错误:类型“MySql.Data.MySqlClient.MySqlDataReader”的值无法转换为“DataTable”。
错误代码:dt = cmd.ExecuteReader()