Ver Mensaje Individual
  #2  
Antiguo 02-08-2005
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Reputación: 29
Lepe Va por buen camino
Cita:
Empezado por Ayuda de delphi
This statement appends a record to the Customer table. Note that Nulls are entered for some of the values, but are not required for missing values at the end of the array argument, i.e. after the Discount field.

Customer.AppendRecord([CustNoEdit.Text,CoNameEdit.Text, AddrEdit.Text, Null, Null, Null, Null, Null, Null, DiscountEdit.Text]);
Como ves, tienes que pasarle valores a todos los campos.

Otro método podría ser:
Código Delphi [-]
table1.Append;
table1.FieldbyName('lo que sea ').AsString := table2.FieldbyName('nombre producto').asString;

table1.Post;

Otra forma, creando una query de actualizacion:
Código Delphi [-]
var q:Tquery;
begin
  q := Tquery.Create(nil);
try
  q.sql.text := 'INSERT INTO tablaDestino SET campo1 = valor1, campo2 = valor2';
  q.ExecSql;
finally
   freeandnil(q);
end;
end;

A ver cual te gusta más

Un saludo
__________________
Si usted entendió mi comentario, contácteme y gustosamente,
se lo volveré a explicar hasta que no lo entienda, Gracias.
Responder Con Cita