Código Delphi [-]Function GET_GEN ( IBQuery1 : TIBQuery ) : Integer; // You can add more parameters like: GEN_NAME : String, and TDBGrid, etc... // Called by KeyDown event using Key = VK_INSERT Begin IBQuery1.Close; IBQuery1.Clear; IBQuery.SQL.Add( 'Select GEN_ID( 'GEN_NUM_TALLER', 0) FROM RDB$DATABASE' ); //Extract without alteration IBQuery.Open; Result := IBQuery1.Fields[0].AsInteger; // ¿Se podría extraer el dato de algún otro modo? End;
Function GET_GEN ( IBQuery1 : TIBQuery ) : Integer; // You can add more parameters like: GEN_NAME : String, and TDBGrid, etc... // Called by KeyDown event using Key = VK_INSERT Begin IBQuery1.Close; IBQuery1.Clear; IBQuery.SQL.Add( 'Select GEN_ID( 'GEN_NUM_TALLER', 0) FROM RDB$DATABASE' ); //Extract without alteration IBQuery.Open; Result := IBQuery1.Fields[0].AsInteger; // ¿Se podría extraer el dato de algún otro modo? End;