在运行过程中出现错误提示(100分)

5

51big

Unregistered / Unconfirmed
GUEST, unregistred user!
代码:
各位高手,我用DELPHI编了一个程序(需连接数据库的),在WIN98就一切正常,到WIN2000系统就出现以下错误:
Project program.exe raised exception class EDBEngineError with message'General
SQL error.ct_send():user api layer:external error:Thie routine cannot be
called because another command structure has results pending'.Process stopped.
Use Step or Run to continue

请多多指教了
我建的内部过程代码如下:
procedure TmainForm.TransParamOpenStoredProc1(StoredProcTmp: TStoredProc; TelNo: String; OverDay: Integer);
begin
if StoredProcTemp.State<>dsInactive then
StoredProcTemp.Close;
StoredProcTemp:=StoredProcTmp;
StaDate := EncodeDate(StartYearSpinEdit.Value,StartMonthSpinEdit.Value,StartDaySpinEdit.Value);
EndDate := EncodeDate(EndYearSpinEdit.Value,EndMonthSpinEdit.Value,EndDaySpinEdit.Value)+1;
StoredProcTemp.Params.ParamByName('@max_date').AsDateTime := EndDate ;
StoredProcTemp.Params.ParamByName('@min_date').AsDateTime := StaDate ;
StoredProcTemp.Params.ParamByName('@maintaingroup').AsString := MaintainGroup ;
StoredProcTemp.Params.ParamByName('@sectnumber').AsInteger := SectionNoDBLookupComboBox.KeyValue ;
StoredProcTemp.Prepare;
StoredProcTemp.Open;
RecordCount:= StoredProcTemp.RecordCount;
DBModule.ReportDatasource.DataSet := StoredProcTemp ;
end ;
 
顶部