I have a TRemoteDatamodule (DOA 4.0.7, Delphi 2007) where there are three datasets set in master->detail->detailofdetail relationship. A provider is attached to the master dataset, and details are handled the Datasnap way, embedded as TDatasetFields within the datapacket.
When Unidirectional is set to True to save datasnap server memory, a "Record x not accessible in Unidirectional mode" exception is raised. Looking at the stack trace, it looks detail datasets are refreshed in a way that ends up to call TDataset.First after records are read - and of course that's not possible when the dataset is in Unidirectional mode.
I also see that TDataset.SetUnidirectional() is never called - and it's the method that sets the TDataset.IsUnidirectional property which is checked inside TDataset methods to change TDataset behaviour.
I tried to call it in TOracleDataset.SetUnidirectional(), but that just leads to AVs, probably because with that setting some internal data are not initialized.
Right now the only acceptable workaround I found was to set the master Unidirectional property to True, leaving it to false in details datasets.
Last edited by ldsandon; 03/13/09 04:36 PM.