Mega Search
23.2 Million


Sign Up

Make a donation  
Migration question [Edit]  
News Group: embarcadero.public.delphi.database.firedac

I am currently migrating from FIBPlus to FireDac. I am  using the following code to get a value from a generator:

{code}
function TdmBase.GetGID: Integer;
begin
  result := -1;
  if spGID.SQL.Text <> '' then
    begin
      spGID.ExecQuery;
      result := spGID.Current.Vars[0].asInteger;
    end;
end;
{code}

SpGID was a TFIBStoredProc that was converted to a TFDStoredProc. The SP.GID.SQL.Text is filled when an append for a new record is made and contains i.e. 'execute procedure SP_GetNextEmployeeGID'. After fiddling around for a while I still cannot get it to work correctly. What would the correct 'translation' to FireDac be? The above code is the original code what was used for FIBplus components.

Kind regards,

Jerri

Edited by: Jerri Schrijver on Jan 22, 2015 1:41 AM

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 22-Jan-2015, at 1:41 AM EST
From: Jerri Schrijver