problem with stored procedure returning 2 datasets (MySQL 8)

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

problem with stored procedure returning 2 datasets (MySQL 8)

Post by abk964 »

Second dataset is readable in first call of procedure only.

Procedure DDL:

Code: Select all

CREATE PROCEDURE `TwoDSTest`()
BEGIN
    SELECT * FROM (VALUES ROW(1.1, 1.2), ROW(2.1, 2.2)) as T(f1, f2);
    SELECT * FROM (VALUES ROW(3), ROW(4), ROW(5)) as T2(f3);
END
Test project attached.
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: problem with stored procedure returning 2 datasets (MySQL 8)

Post by abk964 »

Solved by changing NextRecordSet (aka NextResultSet) to SetResultSet(1) for second DS.
"Open" does not clean FActiveResultIndex, so it stores from previous call. Have to use absolute value via SetResultSet.
Post Reply