 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Hansen Guest
|
Posted: Tue Dec 30, 2003 9:39 am Post subject: Save TDateTimePicker.date and DBEdit with ADOTable |
|
|
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?
|
|
| Back to top |
|
 |
Kevin Frevert Guest
|
Posted: Tue Dec 30, 2003 12:48 pm Post subject: Re: Save TDateTimePicker.date and DBEdit with ADOTable |
|
|
Hansen,
Check out the BeforePost event on the TADOTable component or set the value
on the Save button click event.
Good luck,
krf
"Hansen" <hansenbong (AT) imcindonesia (DOT) org> wrote
| Quote: | Hi, I need help.
Any suggestion, please?
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|