5
51big
Unregistered / Unconfirmed
GUEST, unregistred user!
代码:
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 ;