版本:3012
问题:两个query进行数据查询,第一个执行完毕后,第二个就死了,open不了了。没有反应了。但是单独执行任何一个都可以执行,速度也都还可以。Q_Cargo 有10000条数据,Q_fee 有48000条数据。在delphi7下面执行一点问题都没有,为什么在建模工具下执行不了啊?
环境:服务器在局域网内
补充说明:如果访问本地的数据库,不会存在这个问题,还是请帮忙找下原因和解决方式。
with Q_Cargo do
begin
if Filtered = true then filtered := false;
Close;
CommandText := ' select Dept_Cod, (CNTR20+CNTR40) Cntr_num, SHIPPER_NAM, SHIPPER_ID, id,chk_dte from cargo_bil Where dept_cod = cntr_dept and use_id =''T'' '
+ 'and chk_id =''T'' and shyw_id = ''F'' '
+ sqlstr ;
Open;
end;
with Q_Fee do
begin
if Filtered = true then filtered := false;
Close;
CommandText := ' Select fee_acc_bil.fee_amnn, fee_acc_bil.fee_typ, fee_acc_bil.bil_dte, fee_acc_bil.dept_cod, cargo_bil.shipper_id,cargo_bil.shipper_nam from fee_acc_bil,cargo_bil '
+' where fee_acc_bil.src_bil_id = cargo_bil.Id and cargo_bil.shyw_id = ''F'' and cargo_bil.use_id = ''T'' AND FEE_COD <> ''039'' ' // 039 »õ´úëÀû
+' and (fee_typ = ''YS'' or fee_typ = ''YF'') '
+ sqlstr1 ;
Open;
end; |