Home DADE
New Blog Posts: Merging Reports - Part 1 and Part 2

Ado Timeout

edited February 2003 in DADE
Hi.

I use folowing code to get sql object and modify sql .

Dispite is set command timeout for adoconnection to 0 I am still getting
time out errors.

Vlad

function TReportSelectFrm.GetSQLObject(aReport: TppReport; var aSQL:
TdaSQL):
Boolean;
var
lDataModule : TdaDataModule;
lDataView : TdaDataView;
begin

aSQL := nil;

{get the datamodule}
lDataModule := daGetDataModule(aReport);

if (lDataModule <> nil) then
begin
lDataView := lDataModule.DataViews[1];

if (lDataView <> nil) and (lDataView is TdaQueryDataView) then
aSQL := TdaQueryDataView(lDataView).SQL;

end;
Result := (aSQL <> nil);
end;


begin
SQLStrings := tstrings.create;
GetSQLObject(ppReport1, lSQL);
try
SQLStrings := lSQL.sqltext;
except
on E: Exception do
;
end;
SQLStrings[1] := '''' + ReportSettingsFrm.HW.NodeCode +
ReportSettingsFrm.HW.NodeType + ''',';
SQLStrings[2] := '''' + ReportSettingsFrm.dp1.Code + ''',';
SQLStrings[3] := ReportSettingsFrm.pte.Year + ',';
if ReportSettingsFrm.pte.Quarter = '' then
SQLStrings[4] := '0,'
else
SQLStrings[4] := ReportSettingsFrm.pte.Quarter + ',';
if ReportSettingsFrm.pte.Month = '' then
SQLStrings[5] := '0'
else
SQLStrings[5] := ReportSettingsFrm.pte.Month;
try
lSQL.sqltext.Text := SQLStrings.text; // here I get timeout error
except
end;
// ShowMessage(lSQL.sqltext.text)

Comments

  • edited February 2003
    If you test with RB 7.01 does the problem go away?

    If you are using Delphi 5, do you have update pack 2 installed?

    If you remove this code do you still get the ADO timeout error?

    Can you reproduce this problem using our end user demos?

    Do you have one ADOConnection on the form/Datamodule? Is it connected via
    the Datasettings of hte designer? Is there one ADOConnection that the
    dataviews were created with originally, but now there is a different one
    configured on the designer datasettings? The dataviews store the
    datasettings that are needed to connect to the database.

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.