Ver Mensaje Individual
  #1  
Antiguo 12-05-2011
elturu15 elturu15 is offline
Miembro
NULL
 
Registrado: abr 2011
Posts: 37
Reputación: 0
elturu15 Va por buen camino
Insertar en Access

Hola Tengoun gran problema...hice un proyecto con Access y ADOquery y todo bien pero ahorale tengo que agregar Alta de Usuarios. Para esto creo una Table en Access llamada Usuarios donde tiene un campo NombreUser : Texto y Pas : Texto.
Y el problema es que cuando realizo el proseso de incertar, que es el mismo que utilize anteriormente y ninca me trajo problemas, me Salta un Error que dice:

" El parametro [Campo.-nombre-user] no tiene un Valor Predeterminado "...

Pq me sale este esrror si nunca me salio antes y Otra cosa...solo pasa cuano ingreso letras!!!

el codigo que uso es el siguiente
Código Delphi [-]
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
     ADOQuery1.SQL.Text:='SELECT * FROM operadores WHERE (nombre = '+ edit1.Text +') order by nombre;';
     ADOQuery1.Open;
     if (ADOQuery1.Eof) then
         begin
           ADOQuery1.Close;
           ADOQuery1.SQL.Clear;
           ADOQuery1.SQL.Text:='INSERT INTO operadores (nombre, contra, nivel) VALUES ( '
           + edit1.Text  + ' , ' + '''' + edit2.Text  + '''' + ' , ' + '''' + edit3.Text  + '''' + ');';
           ADOQuery1.ExecSQL;
           Showmessage('¡Empleado Ingresada!');
         end
       else
         ShowMessage('ERROR, Ya Existe'
);


que algien me ayude ja!
Responder Con Cita