I'm asking myself a question about the way to filter content of a clientdataset in a 3 tier datasnap architecture : Oracle DB <=> My Datasnap Server <=> My Datasnap clients
I have a Oracle table accessed thru a TDSProviderConnection and a TClientDataset.
Multiple clients are using the dataset, which contains a field named "clientId".
I would like each client to request only his rows (just like WHERE clientId = 'Client1' in a sql statement).
If I understant right, use of filter doesn't not reduce overhead.
myclientdataset.Filter:= 'ClientId = Client1';
myclientdataset.Filtered:= true;
As this pass all the client anyway. I want the server to filter what's sent.
But I have no idea how to accomplish this using these components.
Any idea would be greatly appreciated.
Regards, JP
Sounds like a task for a parametrized query as described in this etutorial. As each client sets its own parameter only the requested data is transferred to each client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With