说得不明白,用什么库,应该是用BDE的ODBC驱动的吧?贴一点代码出来嘛,这么说实在不够清楚

解决方案 »

  1.   

    你用delete 吗?还是用delete from 吧!
      

  2.   

    我的程序如下:
    sccx.close;
    sccx.Prepare;
    sccx.sql.clear;
    sccx.sql.add('delete  from ":dljfq:dljfq"  where ddate=:ddate and gh=:gh');
    sccx.ParamByName('ddate').asdatetime:=tjsj;
    sccx.ParamByName('gh').asstring:=scgh;
    sccx.open;
    其中dljfq为服务器上的一个sql数据库,我在通过一个query修改或删除服务器上的数据时,系统总是提示非法操作,好像是idodbc32.dll和idapi32.dll访问错误造成的,但执行查询select没问题,我重装了delphi没有效果,而且用try ...Except on EDatabaseError do ..也不能捕捉到
    这个错误,我实在受不了了,请各位大虾指点.
      

  3.   

    sccx.sql.add('delete  from ":dljfq:dljfq"  where ddate=:ddate and gh=:gh');
    就改为:
    sccx.sql.add('delete  from "dljfq.dbo.dljfq"  where ddate=:ddate and gh=:gh');
    试试,看行不行?
      

  4.   

    我想sccx.open改為sccx.execsql試試吧!
      

  5.   

    补充一下三毛说的在sccx.execsql 之前,加上sccx.prepare