我正在使用此代码
SqlCommand sqlCmd = new SqlCommand("SELECT Name,Price from Inventory", con);
SqlDataReader sqlReader = sqlCmd.ExecuteReader();
while (sqlReader.Read())
{
adapter.Add((string)sqlReader["Name"]);
adapter.Add((string)sqlReader["Price"]);
}
sqlReader.Close();
我收到错误指定的强制转换无效.Column Price它存储为float