Save TDateTimePicker.date and DBEdit with ADOTable
From: Hansen (hansenbong_at_imcindonesia.org)
Date: 12/30/03
- Next message: Atmapuri: "Parameters for the ADO query!"
- Previous message: ken brewer: "datamodule designer"
- Next in thread: Kevin Frevert: "Re: Save TDateTimePicker.date and DBEdit with ADOTable"
- Reply: Kevin Frevert: "Re: Save TDateTimePicker.date and DBEdit with ADOTable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Dec 2003 16:39:53 +0700
Hi, I need help.
I use ADOTable1 and DataSource1 on my Registration form.
The Table's fields inserted from DBEdit (ID, Name, Birthplace, Address) and
TDateTimePicker1 (Birthdate).
When I wanted to insert new data, I click on button "Insert", which had
these command lines :
ADOTable1.Insert;
DBEdit1.setfocus;
This works fine.
Then when I wanted to save the data, I click on button "Save", which had
these command lines:
try ADOTable1.post;
except
begin
beep; showmessage('Error occured while saving data');
ADOTable1.cancel;
end;
end;
If I use this kind of save, the DateTimePicker1.date won't be saved into the
table because it's not a DB component.
How could I save the DateTimePicker1.date into the field 'birthdate' in my
table?
Could still use the DBEdit? because with the DBEdit is easier for me to
manipulate data, except for the birthdate.
Any suggestion, please?
- Next message: Atmapuri: "Parameters for the ADO query!"
- Previous message: ken brewer: "datamodule designer"
- Next in thread: Kevin Frevert: "Re: Save TDateTimePicker.date and DBEdit with ADOTable"
- Reply: Kevin Frevert: "Re: Save TDateTimePicker.date and DBEdit with ADOTable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]