Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #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
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:56 PM.


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