DARemoteDataAdapter

来源:互联网 发布:focusky mac 中文版 编辑:程序博客网 时间:2024/06/02 09:59

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.

原创粉丝点击