Hello,
I have a stored procedure as follows:
CREATE DEFINER = 'root'@'localhost' PROCEDURE `Get_MyValue`(IN cnr cHAR(10))
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
Select cbk_category from cbk
Where cbk_cnr=cnr;
END;
If I call this procedure from an sql statement like this:
Call Get_MyValue("S10155")
Then I can see every row displayed (like the result of a normal Select).
How can I retrieve the rows (because there might be many rows) from Delphi, calling the stored procedure?
The following code doesn't work, it will never enter in the iteration:
while not eof do
Begin
ShowMessage(FieldByName('cbk_category ').AsString);
Next;
end;
I use Delphi 2006 and MyDac 4.40.0.24.
If my version is not capable to do that but the version 5 is, than I am willing to upgrade.
By the way how can I see the difference between the version 4 and 5?
When should I expect the version 6? If it is not so far it would be easier for me to upgrade directly to 6.
Thank you in advance
How to retrieve values from a Stored Procedure
-
Zsolt Csillag
- Posts: 30
- Joined: Sun 28 May 2006 16:09
This code should work both in MyDAC 4.40 and MyDAC 5.20.
Please make sure that your TMyQuery calling this procedure is active and that it returns rows.
If it does, try to add a call to the First method before the cycle.
Please make sure that your TMyQuery calling this procedure is active and that it returns rows.
If it does, try to add a call to the First method before the cycle.
You can refer to this page: http://crlab.com/mydac/history.htmlZsolt Csillag wrote:By the way how can I see the difference between the version 4 and 5?
We have no estimate of MyDAC 6. So you can upgrade to MyDAC 5.Zsolt Csillag wrote:When should I expect the version 6? If it is not so far it would be easier for me to upgrade directly to 6.