在下面的代码片段中,TQuery 使用 Sessions 对象分配了一个 DatabaseName。您能否建议我们如何在 fireDAC 中进行以下操作或类似操作?
TmpQuery := TQuery.Create(nil);
try
with TmpQuery do
begin
SessionName := Sessions.CurrentSession.SessionName;
DatabaseName := Sessions.CurrentSession.Databases[0].DatabaseName;
SQL.Add('select tendr_type, tendr_code');
SQL.Add('from asatendr where tendr_status="A" ');
Open;
while not EOF do
begin // do the name value pair so i can find them...
FaTenderList.Add(Trim(Fields[0].AsString) + '=' + Trim(Fields[1].AsString));
Next;
end;
Close;
在 fireac 中,我们有 TFDManager、TFDConnection、TFDQuery 对象。我只想知道不同 .pas 文件中的多个 TFDQueries 如何访问类似的连接。这是如何在 fireDAC 中管理的?