Ver Mensaje Individual
  #1  
Antiguo 23-07-2011
avila avila is offline
Miembro
 
Registrado: may 2011
Posts: 13
Reputación: 0
avila Va por buen camino
ADOQuery guardar datos

Hola a todos:
Necesito saber si hay otra forma de guardar datos capturados a traves de Edits? usando un ADOQuery, éste es el único código que me ha funcionado pero quiero saber si lo estoy escribiendo bien y para que sirve "SQL.Close", me he dado cuenta que para delphi es indiferente si lo incluyo. También me he dado cuenta que al ingresar datos en verdad cierra la tabla que estoy consultando, cómo puedo abrirla nuevamente?

Código Delphi [-]


procedure TfrmProductos.btnGuardarClick(Sender: TObject);
begin
  With detalleGral do
  begin
   SQL.Clear;
   SQL.Add('insert into detalleGral (fecha,cod_producto,cantidad,' );
   SQL.Add('observaciones,no_inventario,id_cuenta) values(');
   SQL.Add(''+QuotedStr(MaskFecha.Text)+','+QuotedStr(EditCodProd.Text)+','+QuotedStr(EditCantidad.Text  )+',');
   SQL.Add(''+QuotedStr(EditObs.Text)+','+QuotedStr(EditInventa.Text)+','+QuotedStr(EditCta.Text)+')');
   ExecSQL;
end;
Responder Con Cita