Ver Mensaje Individual
  #1  
Antiguo 07-03-2007
deadsystems deadsystems is offline
Miembro
 
Registrado: mar 2007
Posts: 12
Reputación: 0
deadsystems Va por buen camino
¿Por qué no inserta?

Hola, amigos del foro.

Tengo una aplicación donde quiero guardar en una base de datos en MS Access los datos que se introducen en un formulario que contiene edit's.
Cuando oprimo el boton guardar se debe ejecutar el siguiente código SQL

Código SQL [-]
  With Datamodule6 do begin
    With Guarda_Colega do begin
      Close;
      Active := True;
      With SQL do begin
        Clear;
        Text := 'INSERT INTO TColegas (indicativo, nombre, apellido1, apellido2) Values (:indicativo, :nombre, :apellido1, :apellido2)';
        ParamByName('indicativo').Value:=edit9.Text;
        ParamByName('nombre').Value:=edit5.Text;
        ParamByName('apellido1').Value:=edit6.Text;
        ParamByName('apellido2').Value:=edit7.Text;
        ExecSQL;
      end;
    end;
  end;

Sin embargo, cuando ejecuto el código me devuelve un error.

¿Qué estoy haciendo mal?

Saludos.
Responder Con Cita