out param with mydac Stored Procedure

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
nbalcarres
Posts: 1
Joined: Mon 23 Jan 2006 22:20

out param with mydac Stored Procedure

Post by nbalcarres » Mon 23 Jan 2006 22:22

Any one know how to use the out param with mydac?

I can use IN param - but not out. I get all kinds of errors. :?:

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 24 Jan 2006 13:17

MySQL Server data transferring protocol does not support output parameters.
To get parameters from MySQL Server you should use SELECT statements. For example:

Code: Select all

  with MyQuery1 do begin
    SQL.Add('SELECT 1+1 INTO @par1;');
     SQL.Add('SELECT 2+2 INTO @par2;');
     SQL.Add('SELECT @par1 AS p1, @par2 AS p2;');
     Open;
     Label1.Caption := FieldValues['p1'];
     Label2.Caption := FieldValues['p2'];
   end;

Guest

Post by Guest » Mon 24 Jul 2006 20:35

I am just looking at these messages and am wondering what exactly does the

1+1 and 2+2 stand for?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 25 Jul 2006 07:08

This test example only shows how to return values from the server and it does not have any practical meaning.

Post Reply