1、Select * From chuang_AgentInfo Where UserName='成都' --在MySql工具里面查询有记录
2、以下代码查询上面语句,没有记录table.row.count为0
MySqlCommand thisCommand = new MySqlCommand();
thisCommand.CommandTimeout = 0;
// make sure connection is open
MySqlConnection con = new MySqlConnection(vStrConn);
try
{
con.Open();
thisCommand.Connection = con;
thisCommand.CommandText = SQL;
MySqlDataAdapter thisAdapter = new MySqlDataAdapter();
thisAdapter.SelectCommand = thisCommand;
DataTable table = new DataTable();
thisAdapter.Fill(table);
return table;
}
3、以上代码查询 Select * From chuang_AgentInfo 有记录,可以查到。