注册 登录
编程论坛 Delphi论坛

关于ORA-00933: SQL command not properly ended的问题

发布于 2010-05-03 12:07, 2184 次点击
代码如下: 执行第一遍没有任何问题,也能得到我想要的结果,但是执行第二遍是就会跳出这个错误,那位高手知道是什么原因吗?怎么解决?多谢!
with UniQuery4 do
  begin
    UniQuery4.Close;
    str2:='select * from fctsch_com where shemid in (select shemid from fctsch_main where cardname='+''''+ComboBox1.text+''')'+' order by comid ';
    SQL.Add(str2);
    UniQuery4.Open;
    UniQuery4.First;
    while not UniQuery4.Eof do
    begin
      IDcode:=UniQuery4.fieldbyname('IDcode').Value;
      Srcode:=UniQuery4.fieldbyname('Srcode').Value;
      dataformat:=UniQuery4.fieldbyname('dataformat').Value;
      next;
    end;
end;
1 回复
#2
2010-05-03 15:26
解决了 少写了一行 晕死
1