Print Thread
ApplyUpdates: Datasets must belong to this Session
#6269 04/05/04 07:59 PM
Joined: Dec 2002
Posts: 18
SHREVEPORT, LA USA
R
Member
OP Offline
Member
R
Joined: Dec 2002
Posts: 18
SHREVEPORT, LA USA
I have 2 datasets. I is the master and one the detail. I do not need to update the master. Cached updates is true on the detail only. Is that why I'm getting this message?

Re: ApplyUpdates: Datasets must belong to this Session
#6270 04/05/04 10:23 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
No. It would seem that the master and detail dataset are not connected to the same TOracleSession instance. Could this be the case?


Marco Kalter
Allround Automations
Re: ApplyUpdates: Datasets must belong to this Session
#6271 04/08/04 01:57 AM
Joined: Dec 2002
Posts: 18
SHREVEPORT, LA USA
R
Member
OP Offline
Member
R
Joined: Dec 2002
Posts: 18
SHREVEPORT, LA USA
No, that's what it sounded like, but I made sure they were. The session doesn't reside on the same form as the 2 datasets, but they are both pointing to it. The only other thing that I could see was that cached updates was not turned on on the master. Just the detail. Thanks

Re: ApplyUpdates: Datasets must belong to this Session
#6272 04/08/04 08:24 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
Actually, the exception indicates that the session for which you call ApplyUpdates is not the same as the sessions to which the datasets are linked. Could this be the case?


Marco Kalter
Allround Automations
Re: ApplyUpdates: Datasets must belong to this Session
#6273 04/08/04 08:37 PM
Joined: Dec 2002
Posts: 18
SHREVEPORT, LA USA
R
Member
OP Offline
Member
R
Joined: Dec 2002
Posts: 18
SHREVEPORT, LA USA
Nope. The session called was the same. The datamodule that holds the session is named dmposting. The session on that datamodule is ses_posting. Both of the datasets on my main form show dmposting.ses_posting as their session. The name of the master datasource is q_master. The name of the detail datasource is q_detail. Cached updates is true only on q_detail. In the code, I apply like this:

dmposting.ses_posting.applyupdates([q_detail],true);


I've gone around it by not using cached updates, but I was hoping to find out what the problem was for future projects. Do I need to list the q_master in the dataset array even though cached updates are not on for that dataset?

Thanks

Re: ApplyUpdates: Datasets must belong to this Session
#6274 04/09/04 09:03 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
What happens if you try this?

q_detail.session.applyupdates([q_detail],true);

This must be right.


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.022s Queries: 12 (0.008s) Memory: 2.5193 MB (Peak: 3.0427 MB) Data Comp: Off Server Time: 2024-05-18 18:16:36 UTC
Valid HTML 5 and Valid CSS