我觉得这很奇怪,我有这个代码:
string getBatchesQuery = "SELECT DISTINCT CONVERT(VARCHAR(8), time, 4) AS Batch FROM Calls ORDER BY Batch";
SqlCommand getBatchesQueryCom = new SqlCommand(getBatchesQuery, connection);
SqlDataReader getBatchesQueryReader = myCom.ExecuteReader();
List<string> allBatches = new List<string>();
while (getBatchesQueryReader.Read())
{
allBatches.Add(getBatchesQueryReader["Batch"].ToString());
}
getBatchesQueryReader.Close();
现在怎么可能Batch
不存在呢?也许是因为我这样命名它?
我应该怎么办?