Sybase sp_help - first ResultSet, not last

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
CompsSQL
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 03.03.2012, 12:48

Sybase sp_help - first ResultSet, not last

Post by CompsSQL »

the Sybase sp_help procedure returns multiple resultsets, but the actual reply is in the very first resultset. In SQL Advantage (the Sybase client program to execute queries), you get for example this answer :
(373 rows affected)
(0 rows affected)
(0 rows affected)
(0 rows affected)
(return status = 0)
So 4 resultsets are returned, but only the first one contains actual data.

In ZDbcDbLibStatement.pas, there is a function TZDBLibStatement.ExecuteQuery, which contains a loop to get resultsets until there are no more available, effectively returning the last resultset.

For procedures like "sp_who", this is OK as for these procedures the actual data is inside the last resultset, but not for "sp_help"
Is there a way to obtain the first resultset instead of the last one?

(I am adding overloaded ExecuteQueries in the code with an extra boolean parameter to indicate that the loop should stop as soon as a valid resultset is found. Probably not the best solution)
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

It seem's nobody can help you here! Me too, i must admit. Maybe you can improve something and tel us your sultion?

Btw. What about your other prefetch_rows thread?

best regards,
EgonHugeist
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Locked