home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Runimage / Delphi50 / Demos / Ado / Rds / clientmain.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-08-11  |  1.3 KB  |  57 lines

  1. unit ClientMain;
  2.  
  3. { RDS Client Demo -
  4.  
  5.   Open and Run RDSServer.DPR before running this project.
  6.   You can switch between using the supplied AppServer and
  7.   the default RDS DataFactory by selecting from the Combobox.
  8.   When using the DataFactory the ConnectionString on the dataset is
  9.   used by the DataFactory.Query method.
  10.  
  11.   If you have not used the DataFactory before you will need to
  12.   edit the MSDFMAP.INI file in your Windows directory:
  13.   In the [connect default] section change the Access to ReadWrite.
  14.   In the [sql default] section, comment out the SQL=" " line.
  15.  
  16. }
  17.  
  18. interface
  19.  
  20.  
  21. uses
  22.   Windows, Forms, StdCtrls, ExtCtrls, Classes, Controls, Grids, Db, ADODB,
  23.   DBGrids;
  24.  
  25. type
  26.   TForm1 = class(TForm)
  27.     DBGrid1: TDBGrid;
  28.     Employee: TADODataSet;
  29.     DataSource1: TDataSource;
  30.     RDSConnection1: TRDSConnection;
  31.     Panel1: TPanel;
  32.     ServerNameCombo: TComboBox;
  33.     OpenButton: TButton;
  34.     procedure OpenButtonClick(Sender: TObject);
  35.   private
  36.     { Private declarations }
  37.   public
  38.     { Public declarations }
  39.   end;
  40.  
  41. var
  42.   Form1: TForm1;
  43.  
  44. implementation
  45.  
  46. {$R *.DFM}
  47.  
  48. procedure TForm1.OpenButtonClick(Sender: TObject);
  49. begin
  50.   RDSConnection1.Close;
  51.   RDSConnection1.ServerName := ServerNameCombo.Text;
  52.   Employee.Close;
  53.   Employee.Open;
  54. end;
  55.  
  56. end.
  57.