unit fmClientMain;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Buttons, Grids, DBGrids, DBCtrls, ComCtrls,
  DB, DBClient, MConnect, Midas, Provider;

type
  TForm2 = class(TForm)
    DataSource1: TDataSource;
    BitBtn1: TBitBtn;
    LabeledEdit2: TLabeledEdit;
    cbProvider: TComboBox;
    BitBtn2: TBitBtn;
    DCOMConnection1: TDCOMConnection;
    DBNavigator3: TDBNavigator;
    DBGrid3: TDBGrid;
    cdsData: TClientDataSet;
    procedure BitBtn2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.BitBtn2Click(Sender: TObject);
var
  aps : IAppServer;
  Params : OleVariant;
  OwnerData : OleVariant;
  iRecOut : Integer;
begin
  aps := IAppServer(IDispatch(Self.DCOMConnection1.AppServer));
  cdsData.Data :=
    aps.AS_GetRecords('DataSet' + cbProvider.Text, -1, iRecOut, ResetOption,
    Self.LabeledEdit2.Text ,Params, OwnerData);
  //cdsData.Data := vData;
end;

end.
