Saludos,
No me recore el string Grind y me ingresa la misma linea las mismas veces que el la cantidad de lineas.
Este es el codigo.
Código Delphi
[-]
var
i : integer;
Begin
For i := 1 to Sg.RowCount-1 do
begin
QTemp.SQL.Clear;
QTemp.SQL.Text := 'Insert Into FacturaItem (CodFactura, CodParte, Cantidad, Descripcion, Precio,'+
'Total, Impuesto) Values '+
'(:CodFactura, :CodParte, :Cantidad, : Descripcion, :Precio, :Total, :Impuesto)';
QTemp.Parameters.ParamByName('CodFactura').Value := CodigoFact;
QTemp.Parameters.ParamByName('CodParte').Value := SG.Cells[0, SG.Row];
QTemp.Parameters.ParamByName('Cantidad').Value := SG.Cells[1, SG.Row];
QTemp.Parameters.ParamByName('Descripcion').Value := SG.Cells[2, SG.Row];
QTemp.Parameters.ParamByName('Precio').Value := SG.Cells[3, SG.Row];
QTemp.Parameters.ParamByName('Total').Value := SG.Cells[4, SG.Row];
QTemp.Parameters.ParamByName('Impuesto').Value := SG.Cells[5, SG.Row];
QTemp.ExecSQL;
end;
Quiero que me agregue cada linea del string grid a la tabla de forma independiente.
Chao