我在使用AdoQuery中的where 条件时,出现列名无效,可是把同样的sql语句写到AdoQuery中的Sql属性框中就能 执行!请教为什么?谢谢!请给我E-Mail谢谢!!
[email protected] query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select QY,THDW from xs');
query1.SQL.Add('where QY="0001"');
query1.Open;
[email protected] query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select QY,THDW from xs');
query1.SQL.Add('where QY="0001"');
query1.Open;
[email protected] query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select QY,THDW from xs');
query1.SQL.Add('where QY="0001"');
query1.Open;
‘select QY,THDW from xswhere QY="0001"'在“XS”之后或者“Where”之前加上一个“ ”即可。