Firebird stored procedure returning void dataset raise exception

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
abk964
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 24.08.2022, 09:28

Firebird stored procedure returning void dataset raise exception

Post by abk964 »

With Firebird (3 and 2.5) stored procedure returning void dataset raise exception 'Row buffer is not assigned' at

Code: Select all

function TZRowAccessor.IsNull(ColumnIndex: Integer): Boolean;
Call stack:

Code: Select all

TZRowAccessor.IsNull(0)
TZAbstractCachedResultSet.IsNull(0)
TZAbstractPreparedStatement.IsNull(1)
TZAbstractCallableStatement.IsNull(1)
TZAbstractRODataset.RetrieveParamValues
TZAbstractRODataset.InternalOpen
TZStoredProc.InternalOpen
ZFBSPVoidTest
Can't find any solution. Reconnect helps only once.

Example project (Delphi 7) attached.

Procedure DDL:

Code: Select all

SET TERM ^ ;

CREATE OR ALTER PROCEDURE VOID_TEST_PROC ( inparam integer)
returns ( outparam integer)
as
begin
  if (inparam = 0 ) then exit;
  outparam = inparam;
  suspend;
  outparam = inparam + 1;
  suspend;
end^

SET TERM ; ^
You do not have the required permissions to view the files attached to this post.
abk964
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 24.08.2022, 09:28

Re: Firebird stored procedure returning void dataset raise exception

Post by abk964 »

One more.
Third execution of selectable proceture raise exception 'Cursor is already open; GDS Code: 335544841;...".
To reproduce change ExecButtonClick to:

Code: Select all

  
procedure TForm1.ExecButtonClick(Sender: TObject);
var i: integer;
begin
  with ZStoredProc1 do begin
    Params[0].AsInteger := 1;
    Open;
    i := 0;
    while not Eof do begin OutputDebugString(PChar(IntToStr(Fields[0].AsInteger))); Inc(i); Next; end;
    SpinEdit1.Value := Fields[0].AsInteger;
    Close;
  end;
end;

And make 3 clicks.
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: Firebird stored procedure returning void dataset raise exception

Post by Fr0sT »

Hi,
are you using fresh Zeos from SVN/GH? Is your issue fixed following this report viewtopic.php?f=50&t=167308 ?
abk964
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 24.08.2022, 09:28

Re: Firebird stored procedure returning void dataset raise exception

Post by abk964 »

Hi.

Thanks. Have updated to r7867.
Both problems are not solved.

BTW. Isn't right time format in log 'hh:nn:ss"? "mm" - is month.

Code: Select all

function TZLoggingFormatter.Format(LoggingEvent: TZLoggingEvent): SQLString;
...
    SQLWriter.AddDateTime(LoggingEvent.Timestamp, 'yyyy-mm-dd hh:mm:ss.fff', Result);
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: Firebird stored procedure returning void dataset raise exception

Post by Fr0sT »

mm is for minutes when following hh
abk964
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 24.08.2022, 09:28

Re: Firebird stored procedure returning void dataset raise exception

Post by abk964 »

Thanks. Docs say so, but it does not work in Delphi 7. Not sure, than it's really important. Check for myself.
abk964
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 24.08.2022, 09:28

Re: Firebird stored procedure returning void dataset raise exception

Post by abk964 »

Solved both problem by changing TZStoredProc to TZReadOnlyQuery with SQL:

Code: Select all

SELECT * FROM VOID_TEST_PROC(:P0)
Works both with FB 3 and 2.5
Post Reply