Delphi Pages Forums

Delphi Pages Forums (http://www.delphipages.com/forum/index.php)
-   DB-Aware (http://www.delphipages.com/forum/forumdisplay.php?f=5)
-   -   ADO Insert records problem... (http://www.delphipages.com/forum/showthread.php?t=210096)

christos 05-23-2011 06:42 PM

ADO Insert records problem...
 
I have this procedure that inserts a record in my DB.

Code:

procedure TSIGNUP.Button1Click(Sender: TObject);
begin
  with ADOTable1 do begin
    Insert;
    FieldByName('USER_ID').AsString := Edit1.Text;
    FieldByName('FIRSTNAME').AsString := Edit2.Text;
    FieldByName('SURNAME').AsString := Edit3.Text;
    FieldByName('ADDRESS').AsString := Edit4.Text;
    FieldByName('POSTAL_CODE').AsString := Edit5.Text;
    FieldByName('PHONE_NUMBER').AsString := Edit6.Text;
    Post;
  end;
Close;
end;

But when i press the button i get an error (Exception class EOleException). Why is that? It should be working fine. Have i done something wrong?


All times are GMT. The time now is 04:42 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.