First of all, I want to say that I'm a newbi with ZEOS.
I have a problem with a TZQuery...
After calling a proc, I have the next error : "Commands out of sync, you can't run this command now"
this is my code :
Code: Select all
procedure TCLI_002.Actualiser_Pied_Commande;
var
qry : TZQuery;
v_id_cde : integer;
begin
qry := TZQuery.Create(nil);
qry.Connection := gConn;
qry.SQL.Text := 'call GET_PIED_COMMANDE(:P_ID_CDE);';
qry.ParamByName('P_ID_CDE').Value := FID_Cde;
try
begin
qry.Open;
if qry.FieldCount >= 3 then
begin
StatusBar.Panels[1].Text := 'HT: ' + qry.Fields[0].AsString + ' €';
StatusBar.Panels[2].Text := 'TTC: ' + qry.Fields[2].AsString + ' €';
end;
qry.Close;
end
finally
qry.Free;
end;
end;
the MySQL doc specify that it is perhaps due to a leaking call of mysql_use_result. Is is Possible to force this call or something else ?
My connection is (autocommit := false, TransactIsolationLevel := tiNone; Properties.Text := 'CLIENT_MULTI_STATEMENTS=1')
Please help me, I don't know what to do...
Thanks in advance
Fred