View Single Post
  #1  
Old 05-23-2011, 06:42 PM
christos christos is offline
Junior Member
 
Join Date: May 2011
Posts: 4
Default 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?
Reply With Quote