Hola a todos este codigo uso para insertar datos en una tabla y me da error de eof in string detected que es lo que esta mal..
alguien me ayuda ?
gracias
Código Delphi
[-] if(iCliente < 1) then
sCliente := 'null'
else
sCliente := IntToStr(iCliente);
with dmDatos.qryAuxiliar1 do begin
Close;
SQL.Clear;
SQL.Add('INSERT INTO ventasareas (orden, articulo, codigo, descrip, cantidad, precio, tipo,categoria, fecha) VALUES(');
SQL.Add(IntToStr(iRenglon) + ',' + grdDatos.Cells[0,iRenglon] + ',' + grdDatos.Cells[1,iRenglon] + ',' + grdDatos.Cells[2,iRenglon] + ',' + grdDatos.Cells[3,iRenglon] + ',' + grdDatos.Cells[4,iRenglon] + ',' + grdDatos.Cells[6,iRenglon] + ',');
if(Length(grdDatos.Cells[10,iRenglon]) > 0) then
SQL.Add(grdDatos.Cells[10,iRenglon] + ',')
else
SQL.Add('null,');
SQL.Add('''' + QuotedStr(grdDatos.Cells[15,iRenglon]) + ')');
ExecSQL;
Close;
end;