BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Updating query

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Tim
Guest





PostPosted: Tue Mar 01, 2005 12:25 pm    Post subject: Updating query Reply with quote



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





PostPosted: Tue Mar 01, 2005 1:41 pm    Post subject: Re: Updating query Reply with quote



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





PostPosted: Tue Mar 01, 2005 2:54 pm    Post subject: Re: Updating query Reply with quote



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





PostPosted: Tue Mar 01, 2005 3:28 pm    Post subject: Re: Updating query Reply with quote


"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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.