Dear Sirs,
I have my stored procedure, inside among others i have two SELECT statemets.
The first one is just to loop through records and execute my other function for each of them. The result is irrelevant. The second SELECT is to return message about execution.
When I call procedure from MySQL Workbench or from terminal, I get my message as a result.
When I call it from delphi through TMyQuery, the result consists of first SELECT result.
What to do to obtain the result of second SELECT (as in MySQL clients)?
Michal
Stored Procedure return
Re: Stored Procedure return
When working with several result-sets in one query, you can work with them sequentially, one by one. This means, that when you are opening TMyQuery, you will get the first result-set. To access the next result-set, you should call the TMyQuery.OpenNext method. See more details about this method in the MyDAC help: http://www.devart.com/mydac/docs/?devar ... next().htm