Hello,
I have a procedure in DLL which connects to Application Server to retrieve
the data with the following code:
with frmCommunication do
begin
vFileName := GetTemporaryFileName('.xml');
with dtOnDemand do
begin
vDone := False;
while (not vDone) and (not frmCommunication.Cancel) do
try
Application.ProcessMessages;
if Active then Close;
DARemoteDataAdapter.GetDataCall.MethodName := 'SQLGetData';
DARemoteDataAdapter.GetDataCall.RefreshParams;
DARemoteDataAdapter.GetDataCall.ParamByName('aSQLText').AsString
:= StrPas(Data);
DARemoteDataAdapter.GetDataCall.ParamByName('aIncludeSchema').AsBoolean
:= True;
DARemoteDataAdapter.GetDataCall.ParamByName('aMaxRecords').AsInteger
:= -1;
DARemoteDataAdapter.Fill([dtOnDemand], True, True);
vDone := True
except
on E: EROException do
memLog.Lines.Add(E.Message)
end;
end;
The problem is, when the procedure invoked with one SQL, all is working
okay.
When i use another SQL statement, it hangs on DARemoteDataAdapter.Fill call
and then raises exception:
Exception was raised on server: timeout expired.
What could be the reason?
dtOnDemand is TDAADODataTable...Communication is done using
WinInetHTTPChannel...
Thanks,
Eugene.
DARemoteDataAdapter
最新推荐文章于 2024-04-22 09:08:20 发布