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