Ver Mensaje Individual
  #3  
Antiguo 07-07-2006
Arturo Arturo is offline
Miembro
 
Registrado: sep 2004
Posts: 91
Reputación: 20
Arturo Va por buen camino
Muy bien tip usando recordcount pero hay un problema si por ejemplo yo tengo los registros 1,2,3 y borro el 2 al hacer un recordcount me regresa que tengo solo 2 registros y le aumento uno me da el 3 que ya esta registrado el 3 esoy refiriendo al componte clientdataset.

entonces para esto agre las siguientes lineas pero al agregar un registro me pide que del anterior regsitro ingrese el id del articulo cuando ya esta ingresado.

Código PHP:
intUltimo:=CDSreqDet.RecordCount;
 If 
intUltimo=0 then
   intUltimo
:=1
    
else begin
     intUltimo
:=intUltimo 1;
     if 
not CDSreqDet.Locate('REQ_DET_RENGLON'intUltimo, [] ) then  aqui
       CDSreqDetREQ_DET_RENGLON
.Value:=intUltimo
      
else
        if 
intUltimoCDSreqDetREQ_DET_RENGLON.Value then
            intUltimo
:=intUltimo+1;
     
end
 
end;
    
CDSreqDetREQ_DET_RENGLON.Value:=intUltimo 
en pocas palabras si tengo ya el registro 3 el siguiente es el 4.
gracias, espero haberme explicado, ya que me da ese error, algun otro tip
Responder Con Cita