1

以下のコード スニペットでは、Sessions オブジェクトを使用して TQuery に 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;

Firedac には、TFDManager、TFDConnection、TFDQuery オブジェクトがあります。私が知りたいのは、異なる .pas ファイル内の複数の TFDQueries が類似の接続にどのようにアクセスできるかということだけです。これはfireDACでどのように管理されていますか?

4

1 に答える 1