Execute firebird stored procedure in TSQLQuery component. lazarus / 16-Databases ---------------------------------------------------------------------- ciapek · 2008-11-19 08:32 I have a problem with execute stored procedure in lazarus on TSQLQuery component. I execute this procedure but i dont know what I can get parameter from procedure. I do this that: begin      StoredProcPodajGenerator.SQL.Text:='EXECUTE PROCEDURE PODAJGENERATORZEWNETRZNE';      try         StoredProcPodajGenerator.ExecSQL;      except      on E: Exception do                 WriteLn(FormatDateTime('yyyy/mm/dd hh:nn:ss', Now)+' Exception: '+E.Message);      End; my procedure :       BEGIN   Result = Gen_ID(GenZewnetrzne, 1); END     hOW I CAN GET variable Result?? ---------------------------------------------------------------------- jesusr · 2008-11-24 16:55 I think in the procedure you need something like this:  Result = Gen_ID(GenZewnetrzne, 1);  suspend; /* this is missing*/ then something you call it this way: StoredProcPodajGenerator.SQL.Text:='SELECT RESULT FROM PODAJGENERATORZEWNETRZNE'; StoredProcPodajGenerator.Open; MyResultIs := StoredProcPodajGenerator.Fields[0].asInteger; Should do it.