Ver Mensaje Individual
  #1  
Antiguo 06-10-2006
nikotina nikotina is offline
Miembro
 
Registrado: oct 2006
Posts: 84
Reputación: 20
nikotina Va por buen camino
solo guarda el ultimo registro en una tabla

hola a todos. mi problema es que cargo una una table1 por medio del dbgrid y luego necesito pasarlo a otra, table2. el problema es que solo guarda el ultimo registro del table1 en el table2. cuando cierro la aplicacion y la vuelvo a abrir y presiono el boton guardar, ahi si guarda todos los registros.
el codigo es:

procedure bottom1.click(senderbject)
begin
while not table1.eof do
begin
table2.append;
table2.fieldvalues['art_y_esp']:=table1.fieldvalues['art_y_esp'];
table1.post;
table1.insert;
end;
end;

muchas gracias a todos. un abrazo
Responder Con Cita