Ver Mensaje Individual
  #3  
Antiguo 18-11-2005
Avatar de lucasarts_18
lucasarts_18 lucasarts_18 is offline
Miembro
 
Registrado: mar 2005
Ubicación: Villa Alemana,Chile
Posts: 1.087
Reputación: 23
lucasarts_18 Va por buen camino
Hola:

Prueba así:

Código Delphi [-]
 procedure TForm2.BitBtn2Click(Sender: TObject);
 begin
   If (DBEdit1.text <> '') and (DBEdit2.text <> '') then
   begin
   With DataModule7.Table1 Do
   Begin
     Try
     Insert;
     Post;
      Except
     Application.MessageBox ('El nombre introducido no es correcto'+chr(13)+
     'El nombre esta repetido, prueba con otro',
     'Insertar registro',
     Mb_Ok+Mb_IconStop);
     Cancel;
     Insert;
     End;
    End;
    end
   else
   ShowMessage ('¡Debe rellenar todos los campos!')
 end;
 
 end.

Tenías unos parentesis demás..
__________________
No todo es como parece ser...
Responder Con Cita