江
江西的delphi
Unregistered / Unconfirmed
GUEST, unregistred user!
编程环境:D5,Win2000,ADO已升级,Access2000
发布环境:win98或win2000,access2000,安装过mdac_typ2.6或mdac_typ2.5,安装过Jet40SP3_comp.exe
在我的电脑程序运行正常!
在其它电脑运行,只有执行下面这条SQL语句的界面报错(Access Violation at address 11304FE77 in module
'MSJET40.DLL,Read of address FFFFFFF)
其它界面都正常。
怎么办?
with AdoQry do
begin
DisableControls;
Close;
SQL.Clear;
SQL.Add('SELECT TableA.sSellID,TableA.sItemID ,TableA.sBuildingID,TableA.sHouseID,TableA.sClientID ,TableA.sOperatorID,TableA.sAgentID ,');
SQL.Add(' IIF(A.fDealTotal<>NULL,A.fDealTotal,0) AS fDealTotal,IIF(B.fPayTotal<>NULL,B.fPayTotal,0) AS fPayTotal, ');
SQL.Add(' (IIF(fDealTotal<>NULL,fDealTotal,0)-IIF(fPayTotal<>NULL,fPayTotal,0)) AS fDutyPay,(IIF(C.APay<>NULL,C.APay,0)-IIF(fPayTotal<>NULL,fPayTotal,0)) AS fDateNoPay ');
SQL.Add(' FROM ((TableA LEFT JOIN [select sHouseSDID,SUM(IIF(fMoney<>NULL,fMoney,0)) as fDealTotal from Deal group by sHouseSDID]. AS A ');
SQL.Add(' ON (TableA.bIsAvail=True AND TableA.sSellID=A.sHouseSDID)) LEFT JOIN [select sHouseSDID,SUM(IIF(fMoney<>NULL,fMoney,0)) as fPayTotal from ');
SQL.Add(' Pay group by sHouseSDID]. AS B ON TableA.sSellID=B.sHouseSDID) LEFT JOIN [select sHouseSDID,SUM(IIF(fMoney<>NULL,fMoney,0)) as APay from Deal ');
SQL.Add(' where dLimitDate<Now() group by sHouseSDID]. AS C ON (TableA.sSellID=C.sHouseSDID ');
SQL.Add(' AND TableA.sItemID LIKEsItemID AND TableA.sBuildingID LIKEsBuildID AND TableA.sOperatorID LIKEsOperatID AND TableA.sAgentID LIKEsAgentID )');
SQL.Add(' ORDER BY TableA.sSellID ');
Parameters.ParamByName('psItemID').Value:=EDIT1.TEXT;
Parameters.ParamByName('psBuildID').Value:=EDIT2.TEXT;
Parameters.ParamByName('psOperatID').Value:=EDIT3.TEXT;
Parameters.ParamByName('psAgentID').Value:=EDIT4.TEXT;
Prepared:=True;
Open;
EnableControls;
end;
发布环境:win98或win2000,access2000,安装过mdac_typ2.6或mdac_typ2.5,安装过Jet40SP3_comp.exe
在我的电脑程序运行正常!
在其它电脑运行,只有执行下面这条SQL语句的界面报错(Access Violation at address 11304FE77 in module
'MSJET40.DLL,Read of address FFFFFFF)
其它界面都正常。
怎么办?
with AdoQry do
begin
DisableControls;
Close;
SQL.Clear;
SQL.Add('SELECT TableA.sSellID,TableA.sItemID ,TableA.sBuildingID,TableA.sHouseID,TableA.sClientID ,TableA.sOperatorID,TableA.sAgentID ,');
SQL.Add(' IIF(A.fDealTotal<>NULL,A.fDealTotal,0) AS fDealTotal,IIF(B.fPayTotal<>NULL,B.fPayTotal,0) AS fPayTotal, ');
SQL.Add(' (IIF(fDealTotal<>NULL,fDealTotal,0)-IIF(fPayTotal<>NULL,fPayTotal,0)) AS fDutyPay,(IIF(C.APay<>NULL,C.APay,0)-IIF(fPayTotal<>NULL,fPayTotal,0)) AS fDateNoPay ');
SQL.Add(' FROM ((TableA LEFT JOIN [select sHouseSDID,SUM(IIF(fMoney<>NULL,fMoney,0)) as fDealTotal from Deal group by sHouseSDID]. AS A ');
SQL.Add(' ON (TableA.bIsAvail=True AND TableA.sSellID=A.sHouseSDID)) LEFT JOIN [select sHouseSDID,SUM(IIF(fMoney<>NULL,fMoney,0)) as fPayTotal from ');
SQL.Add(' Pay group by sHouseSDID]. AS B ON TableA.sSellID=B.sHouseSDID) LEFT JOIN [select sHouseSDID,SUM(IIF(fMoney<>NULL,fMoney,0)) as APay from Deal ');
SQL.Add(' where dLimitDate<Now() group by sHouseSDID]. AS C ON (TableA.sSellID=C.sHouseSDID ');
SQL.Add(' AND TableA.sItemID LIKEsItemID AND TableA.sBuildingID LIKEsBuildID AND TableA.sOperatorID LIKEsOperatID AND TableA.sAgentID LIKEsAgentID )');
SQL.Add(' ORDER BY TableA.sSellID ');
Parameters.ParamByName('psItemID').Value:=EDIT1.TEXT;
Parameters.ParamByName('psBuildID').Value:=EDIT2.TEXT;
Parameters.ParamByName('psOperatID').Value:=EDIT3.TEXT;
Parameters.ParamByName('psAgentID').Value:=EDIT4.TEXT;
Prepared:=True;
Open;
EnableControls;
end;