Ver Mensaje Individual
  #5  
Antiguo 18-03-2009
Avatar de ContraVeneno
ContraVeneno ContraVeneno is offline
Miembro
 
Registrado: may 2005
Ubicación: Torreón, México
Posts: 4.740
Reputación: 26
ContraVeneno Va por buen camino
Si buscas en la ayuda de delphi sobre este evento, explica que con el parámetro "UpdateKind" puedes identificar si es un registro nuevo, una modificación o están borrando un registro:
Código Delphi [-]
  case UpdateKind of
    ukModify: begin
          //aquí modifican
     end;
    ukInsert: Begin
          ///aquí insertan y aquí deberías buscar el máximo
         DeltaDS.FieldByName('IDDoc').NewValue := IDDoc+1;
     End;
    ukDelete: Begin
       //aquí borran.
    End; //Delete
  end;
__________________

Responder Con Cita