ApplyUpdates: Datasets must belong to this Session

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?
 
No. It would seem that the master and detail dataset are not connected to the same TOracleSession instance. Could this be the case?
 
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
 
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?
 
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
 
Back
Top