 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Tim Guest
|
Posted: Tue Mar 01, 2005 12:25 pm Post subject: Updating query |
|
|
Using a query/datasetprovider/clientdataset/datasource, I have a form
displaying editable information on a person, derived from a MySQL database.
One field allows the person to be designated as a manager and a
DBLookupCombo allows the selection of a manager, if applicable. The
DBLookupCombo gets it's data from a query which returns only those persons
where manager = true.
The problem is updating. In the AfterPost method of the form, I close and
open the query which supplies the dataset for the manager lookup, but
assuming I have just set a person as a manger, they are not shown in the
list. Go in later and there they are.
I can only assume that although I have put the update in the AfterPost
method, the actual changes are not available to the other dataset.
How can I make the updated record immediately available, or maybe it needs
to be done another way?
Thanks.
|
|
| Back to top |
|
 |
Bill Todd Guest
|
Posted: Tue Mar 01, 2005 1:41 pm Post subject: Re: Updating query |
|
|
You must call CDS.ApplyUpdates before the new row is inserted into the
database.
--
Bill Todd (TeamB)
TeamB cannot answer questions received via email
|
|
| Back to top |
|
 |
Tim Guest
|
Posted: Tue Mar 01, 2005 2:54 pm Post subject: Re: Updating query |
|
|
I've been working with BDE too much recently. Using AfterApplyUpdates is
where I should have put my update code. Problem solved.
Tim
|
|
| Back to top |
|
 |
Tim Guest
|
Posted: Tue Mar 01, 2005 3:28 pm Post subject: Re: Updating query |
|
|
"Bill Todd" <no (AT) no (DOT) com> wrote
| Quote: | You must call CDS.ApplyUpdates before the new row is inserted into the
database.
|
Thanks. Tim
|
|
| 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
|
|