原来项目的中间层是使用WEBSERVICE开发的(原程序员离开了公司),程序在客户那儿是正常的,现在因为需要我在公司里再建了一个同样的环境(ORACLE9I+WEBSERVICE),但是其中有一个函数出错。这个错误很奇怪,是在关闭一个QUERY时出现的,但是其它的函数同样也有关闭QUERY的操作却没有这个问题。。出错提示为:Project Project1.exe raised exception class EAccessViolation With message'Access violation at address 00591233 in module'Project1.exe'. Read of address 0000005c'.Process stopped.Use Step or Run to continue.
有朋友说是我的那个Query控件出错了,我试着拉了个新的Query下来,但是在那个函数中,只要一关闭Query就出这个提示错误。
有朋友说是我的那个Query控件出错了,我试着拉了个新的Query下来,但是在那个函数中,只要一关闭Query就出这个提示错误。
改这个只要把.dpr改了就行了
var a1,a2,a3:integer;
s1,s2,cnshow:string;
a4:double;
iid:integer;
readdata:Tmytype;
begin
// result:=0;
try
datamodulecreate;
with datamodule2 do
begin
if not con1.Connected then
begin
try
con1.Close;
con1.Open;
except
exit;
end;
end; rule:=self.clientrule(yingyeting); q1.close;
q1.sql.clear;
q1.sql.add('select yytno from juxiang where addr=:n1');
q1.Params[0].value:=yingyeting;
q1.Open;其中q1.close;就是出错的地方。
if q1.Active=true then q1.close;
q1.sql.clear;
......