View Single Post
  #10  
Old 08/03/2018
bulc's Avatar
bulc bulc is offline
Miembro
 
Join Date: Jun 2010
Posts: 416
Rep Power: 17
bulc Va por buen camino
Ya para terminar, control total con FireDAC

El Generador ya se puede controlar a gusto del poeta. Con este código:
Código Delphi [-]
// Obtener el xNum actual del Generador:
nGen:=FDConnection1.GenLastAutoGenValue('GEN_FOTO');   // o bien
nGenNext := FDM2.FDConnection1.ExecSQLScalar( 'select gen_id(gen_foto, 0) from rdb$database' );
//  y hacer avanzar el generador y obtener el número.  Con lo cual el Trigger ya no es tan vital.
nGenNext := FDM2.FDConnection1.ExecSQLScalar( 'select gen_id(gen_foto, 1) from rdb$database' );
Creo que puede ser útil. Pero tal vez no esté en el hilo apropiado.
Saludos.
bulc

Last edited by bulc : 08/03/2018 at 18:16.
Reply With Quote