Hello @mh,
Now that the nextgen version of RO/DA is available for Delphi and given that asynchronous calls are mandatory in mobile environments, wouldn’t be nice to have asynchronous calls in the TDARemoteDataAdapter class?
Since Delphi XE7 we have the new threading api that simplifies parallel programming tasks.
We are available to help you to implement those methods in Delphi if you wish.
Thank you @EvgenyK,
Would be nice to be notified when the asynch call is finished.
Also, with asynch tasks the user should be able to cancel long running queries.
DOA for example includes a TOracleSession.BreakExecution that can be used for this.
this feature (canceling execution of methods on service-side) isn’t supported.
It can be handled via calling of custom service method that will call something like
in mycallback, which will be fired after BeginFill was finished, you need to have something like
procedure TClientForm.mycallback(const aRequest: IROAsyncRequest);
begin
if (not aRequest.Cancelled) then begin
RemoteDataAdapter.EndFill(aRequest);
ShowMessage('Tables were loaded');
end
else
ShowMessage('Request was cancelled!');
end;
for cancelling async requests on client-side, you can call lRequest.Cancel;. if Request wasn’t sent to server yet, it will be cancelled, otherwise it will be cancelled after server’s response.
for cancelling requests that are already executed, and your driver supports this feature, you need to call a custom method in which you can cancel request.
For DOA driver, it can be reached via calling TOracleSession.BreakExecution on server-side.
One, is obvious the datatables must be in the same remotedataadapter, same dataservice , same schema. Wich is the best way to manage this when you have master-detail and each is on a different schema, dataservice, remotedataadapter?
I getting an error: “Parameter is incorrect” and detail table show no records. after i browse master works perfect. Any idea how to hide that error?
AFAIK detail data is requested when you move in master record. Dont get then how async work in that case. Or always the detail table is retrieved complete to the client side?
master/details should work w/o any problem in case master and detail have different RDA
can you create a simple testcase that demonstrates this error, pls?
we have no Parameter is incorrect exception so it may raised in std TDataset
async calls should be called manually. when you move in master record usual call is fired.
but you can play with TDAMasterOption.moAllInOneFetch and TDADetailOption.dtIncludeInAllInOneFetch options. in this case, all details records will be downloaded in one call.
another solution: open detail table w/o m/d relation and later assign it. in this case, also whole table will be downloaded