Subject | Re: [IBO] SQL Error code 0 or 501 |
---|---|
Author | mw@wobe-team.com |
Post date | 2004-10-09T11:57:50Z |
OK,
no attachments in this mailing list.
86300 Error 000007D0 0 Dynamic SQL Error (17) SQL error code = -501 (21) Attempt to reclose a
004F8231 DoTheFetch in IB_Components.pas (23457) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F82BD TIB_Statement::API_QuickFetch in IB_Components.pas (23474) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F814E TIB_Statement::API_Execute2 in IB_Components.pas (23422) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F6965 TIB_Statement::SysExecute in IB_Components.pas (22752) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004FEC1C TIB_Dataset::SysExecute in IB_Components.pas (26745) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00526E81 TIB_StoredProc::SysExecute in IB_StoredProc.pas (216) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004FDE75 TIB_Dataset::Execute in IB_Components.pas (26337) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00526E73 TIB_StoredProc::Execute in IB_StoredProc.pas (211) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
0064CDF4 TAppCtrl::GetRootObject in AppControl.pas (1329) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
0064D131 TAppCtrl::SetRootFolder in AppControl.pas (1414) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
160640 Error 000007D0 0 Dynamic SQL Error (17) SQL error code = -501 (21) Attempt to reclose a
004F8231 DoTheFetch in IB_Components.pas (23457) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F82BD TIB_Statement::API_QuickFetch in IB_Components.pas (23474) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F814E TIB_Statement::API_Execute2 in IB_Components.pas (23422) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F6965 TIB_Statement::SysExecute in IB_Components.pas (22752) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004FEC1C TIB_Dataset::SysExecute in IB_Components.pas (26745) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00526E81 TIB_StoredProc::SysExecute in IB_StoredProc.pas (216) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004FDE75 TIB_Dataset::Execute in IB_Components.pas (26337) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00526E73 TIB_StoredProc::Execute in IB_StoredProc.pas (211) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00657BE5 TAppCtrl::_GetPathOfObject_ in AppControl.pas (5618) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00651655 TAppCtrl::GetPathOfObject in AppControl.pas (3000) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00666CFA TAppCtrl::PyCreateObject in AppControl.pas (9928) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
163391 Error 000007D0 0 Dynamic SQL Error (17) SQL error code = -501 (21) Attempt to reclose a
004F8231 DoTheFetch in IB_Components.pas (23457) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F82BD TIB_Statement::API_QuickFetch in IB_Components.pas (23474) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F814E TIB_Statement::API_Execute2 in IB_Components.pas (23422) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F6965 TIB_Statement::SysExecute in IB_Components.pas (22752) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004FEC1C TIB_Dataset::SysExecute in IB_Components.pas (26745) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00526E81 TIB_StoredProc::SysExecute in IB_StoredProc.pas (216) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004FDE75 TIB_Dataset::Execute in IB_Components.pas (26337) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00526E73 TIB_StoredProc::Execute in IB_StoredProc.pas (211) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
0064C950 TAppCtrl::CreateObject in AppControl.pas (1174) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00666CFA TAppCtrl::PyCreateObject in AppControl.pas (9928) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
-------- Original Message --------
Subject: [IBO] SQL Error code 0 or 501 (09-Okt-2004 13:30)
From: mw@...
To: mw@...
no attachments in this mailing list.
86300 Error 000007D0 0 Dynamic SQL Error (17) SQL error code = -501 (21) Attempt to reclose a
004F8231 DoTheFetch in IB_Components.pas (23457) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F82BD TIB_Statement::API_QuickFetch in IB_Components.pas (23474) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F814E TIB_Statement::API_Execute2 in IB_Components.pas (23422) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F6965 TIB_Statement::SysExecute in IB_Components.pas (22752) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004FEC1C TIB_Dataset::SysExecute in IB_Components.pas (26745) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00526E81 TIB_StoredProc::SysExecute in IB_StoredProc.pas (216) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004FDE75 TIB_Dataset::Execute in IB_Components.pas (26337) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00526E73 TIB_StoredProc::Execute in IB_StoredProc.pas (211) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
0064CDF4 TAppCtrl::GetRootObject in AppControl.pas (1329) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
0064D131 TAppCtrl::SetRootFolder in AppControl.pas (1414) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
160640 Error 000007D0 0 Dynamic SQL Error (17) SQL error code = -501 (21) Attempt to reclose a
004F8231 DoTheFetch in IB_Components.pas (23457) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F82BD TIB_Statement::API_QuickFetch in IB_Components.pas (23474) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F814E TIB_Statement::API_Execute2 in IB_Components.pas (23422) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F6965 TIB_Statement::SysExecute in IB_Components.pas (22752) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004FEC1C TIB_Dataset::SysExecute in IB_Components.pas (26745) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00526E81 TIB_StoredProc::SysExecute in IB_StoredProc.pas (216) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004FDE75 TIB_Dataset::Execute in IB_Components.pas (26337) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00526E73 TIB_StoredProc::Execute in IB_StoredProc.pas (211) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00657BE5 TAppCtrl::_GetPathOfObject_ in AppControl.pas (5618) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00651655 TAppCtrl::GetPathOfObject in AppControl.pas (3000) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00666CFA TAppCtrl::PyCreateObject in AppControl.pas (9928) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
163391 Error 000007D0 0 Dynamic SQL Error (17) SQL error code = -501 (21) Attempt to reclose a
004F8231 DoTheFetch in IB_Components.pas (23457) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F82BD TIB_Statement::API_QuickFetch in IB_Components.pas (23474) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F814E TIB_Statement::API_Execute2 in IB_Components.pas (23422) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004F6965 TIB_Statement::SysExecute in IB_Components.pas (22752) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004FEC1C TIB_Dataset::SysExecute in IB_Components.pas (26745) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00526E81 TIB_StoredProc::SysExecute in IB_StoredProc.pas (216) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
004FDE75 TIB_Dataset::Execute in IB_Components.pas (26337) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00526E73 TIB_StoredProc::Execute in IB_StoredProc.pas (211) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
0064C950 TAppCtrl::CreateObject in AppControl.pas (1174) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
00666CFA TAppCtrl::PyCreateObject in AppControl.pas (9928) C:\workdir\wNewsNet30\wNewsNet\bin\wns.exe
-------- Original Message --------
Subject: [IBO] SQL Error code 0 or 501 (09-Okt-2004 13:30)
From: mw@...
To: mw@...
>
> Hi,
>
> currently I'm facing some trouble with stored procedures.
> On a heavy load system. I'm getting some errors wich are
> I cannot explain.
>
> My System:
>
> Firebird 1.5.1
> Windows XP P/2003 Server
> Delphi 7E
> IBO 4.3.Aa
>
> Tools:
>
> MemProof 0.9.4.8
>
> 1) sometimes I get an error without any
> ISC or SQL Errornumber like:
>
> 2004 Oct 07 6:52:56 PM:WPS::ERROR:db error: SQL:0 ISC:0
> 2004 Oct 07 6:52:56 PM:WPS::ISC--> 0
> 2004 Oct 07 6:52:56 PM:WPS::ISC--> 0
> 2004 Oct 07 6:52:56 PM:WPS::SQL--> delete from ACTIVE_QUEUE_TAB
> where ACTIVE_QUEUE_ID = ? /* id */
>
> 2004 Oct 07 6:52:56 PM:WPS:::<DeleteActiveQueueEntry> failed
>
> What's this ???
>
> 2) MemProof shows a lot of errors (see attachment).
> The calling code for the procedure in the Screenshot is:
>
> function TAppCtrl.GetRootObject: integer;
> var
> sproc: TIB_StoredProc;
> {$IFDEF DEBUG_VER}
> c, n1, n2: TLargeInteger;
> {$ENDIF}
> begin
> {$IFDEF DEBUG_VER}
> QueryPerformanceFrequency(c);
> QueryPerformanceCounter(n1);
> {$ENDIF}
> sproc := TIB_StoredProc.Create(nil);
> sproc.IB_Connection := _ProdBase;
> sproc.IB_Transaction := _ScriptTransaction;
> sproc.OnError := _OnIBError;
> sproc.Name := 'GET_OBJECT_ID';
> sproc.StoredProcName := 'GET_OBJECT_ID';
> try
> with sproc do
> begin
> ParamByName('PARENTID').AsInteger := 0;
> ParamByName('OBJ').AsString := '__rootlevel__';
>
> ExecProc;
>
> Result := ParamByName('OBJECTID').AsInteger;
> if ParamByName('INSERTED').AsInteger <> 0 then
> FNewObjectsCreated := True;
> end;
> except
> sproc.Free;
> raise;
> end;
>
> sproc.Free;
> {$IFDEF DEBUG_VER}
> QueryPerformanceCounter(n2);
> WriteLog(Format('-> GetRootObject T = %g <-', [(n2 - n1) / c]));
> {$ENDIF}
>
> end;
> //#---------------------------------------------------------------------
>
> The DoTheFetch Method in IB_Components has some comments about a 'Bug' I do
> not
> really understand this. Has this something to do with my Problems ?
>
> ..
> // There seems to be a bug where a cursor on the server is not getting
> closed.
> // Or, it could be getting opened when it should not be.
> // Added code below to attempt to avoid/recover.
> if ( errcode = 0 ) and Assigned( Out_DA ) then
> isc_dsql_free_row_statement( @status, PstHandle, DSQL_CLOSE );
> ..
> // There seems to be a bug where the server is losing the compile.
> // Added code below to attempt to recover.
> if ( errcode = isc_dsql_error ) or
> ( errcode = isc_port_len ) then
> begin
> if ClientMonitorHooksIn then
> begin
> MonitorText := '//>>> STATEMENT PREPARED <<<//'#13#10 +
> 'TIB_Statement.API_QuickFetch()'#13#10 +
> 'Recovery from lost server compile needed.'#13#10 +
> Self.ClassName + ': "';
> if Assigned( Self.Owner ) and ( Self.Owner.Name <> '' ) then
> MonitorText := MonitorText + Self.Owner.Name + '.';
> MonitorText := MonitorText + Self.Name +
> '" stHandle=' + IntToStr(Integer(PstHandle^)) + ' #QF';
> OutputToMonitor( MonitorText );
> end;
> if not StoredProcHasDML then
> begin
> asm fstcw [SaveCW] end;
> tmperr := isc_dsql_prepare( @tmpstatus,
> PtrHandle,
> PstHandle,
> null_terminated,
> PChar(ServerSQL),
> SQLDialect,
> Out_DA );
> asm fldcw [SaveCW] end;
> if tmperr = 0 then
> begin
> asm fstcw [SaveCW] end;
> DoTheFetch;
> asm fldcw [SaveCW] end;
> end;
> end;
> end;
>
> Thanks in advance
> Maik
>
> To: firebird-support@yahoogroups.com
> Cc: IBObjects@yahoogroups.com
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> To: firebird-support@yahoogroups.com
> Cc: IBObjects@yahoogroups.com