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)
Sybase sp_help - first ResultSet, not last
Moderators: gto, EgonHugeist, olehs
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
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
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/
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/