Hi,
I use Delphi 7 + Mysql 5.0.22 + zeoslib 6.6.0 beta and have stored procedure :
CREATE DEFINER=`kasa`@`%` PROCEDURE `suma`(racun_br INT,OUT vrijednost FLOAT)
BEGIN
SELECT SUM(racuni.CijenabezPDV) INTO vrijednost from kasa.racuni where racuni.BrRacuna=racun_br;
END
in shell procedure works fine :
mysql> call suma(5,@izlaz);
Query OK, 0 rows affected (0.02 sec)
mysql> select @izlaz;
+-----------------+
| @izlaz |
+-----------------+
| 3.4188034534454 |
+-----------------+
1 row in set (0.00 sec)
how to get value from mysql variable @izlaz in delphi ?
something like not work correctly ( I get message "Can not open a Resultset") :
procedure TForm1.Button1Click(Sender: TObject);
var rezultat:double;
begin
zquery1.Close;
zquery1.SQL.Clear;
zquery1.SQL.text:='call kasa.suma(5,@izlaz);';
zquery1.Open;
rezultat:=zquery1.Params[0].Asfloat;
end;
How to get value from stored procedure,zeos+mysql5+delphi7 ?
Moderators: gto, cipto_kh, EgonHugeist