string sqlTs = "select au,ma,pl from ts_i where au=East640302";
写为:
string sqlTs = "select au,ma,pl from ts_i where au='East640302'";
试试:)
加个''

解决方案 »

  1.   

    同意楼上。
    对于SQL SERVER里的字符字段及时间字段,查询时都在常量两边应加上单引号。
    string sqlTs = "select au,ma,pl from ts_i where au='east640302' and [时间字段] = '2004/6/9 10:50:00'"
      

  2.   

    string sqlTs = @"select au,ma,pl from ts_i where au='East640302'";
    SqlDataAdapter da1 = new SqlDataAdapter( sqlTs ,cnToTs);//连结cntots也正确
    ds = new DataSet();//ds前面已定义
    try
    {
    da1.Fill(ds, "Ts" );
    }
    catch(Exception ee)
    {
    MessageBox.Show(ee.ToString());
    }
      

  3.   

    string sqlTs = "select au,ma,pl from ts_i where au='East640302';