我的程序如下: 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 ..也不能捕捉到 这个错误,我实在受不了了,请各位大虾指点.
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'); 试试,看行不行?
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 ..也不能捕捉到
这个错误,我实在受不了了,请各位大虾指点.
就改为:
sccx.sql.add('delete from "dljfq.dbo.dljfq" where ddate=:ddate and gh=:gh');
试试,看行不行?