Ver Mensaje Individual
  #2  
Antiguo 06-10-2010
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Reputación: 25
Caral Va por buen camino
Hola
No entiendo muy bien que pretendes con tanto add, pero si hace falta varios + si se añade un dato.
Código Delphi [-]
  SQL.Add('INSERT INTO ventasareas '+
  ' (orden, articulo, codigo, descrip, cantidad, precio, tipo,categoria, fecha)'+
  ' VALUES('+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;
Saludos
__________________
Siempre Novato
Responder Con Cita