home *** CD-ROM | disk | FTP | other *** search
- {
- See the README.TXT for instructions on installing the demo db components
- from the BDETable into COMPLIB.DCL. These components are required for
- properly viewing or building the demo applications in this directory.
- }
-
- unit Opendb;
-
- interface
-
- uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
- StdCtrls, ExtCtrls, Db, Grids, DBGrids, BDETable, DBTables;
-
- type
- TOpenDbDlg = class(TForm)
- OKBtn: TBitBtn;
- CancelBtn: TBitBtn;
- AliasList: TDatabaseList;
- AliasSource: TDataSource;
- AliasGrid: TDBGrid;
- AliasListNAME: TStringField;
- AliasListPHYNAME: TStringField;
- AliasListDBTYPE: TStringField;
- procedure FormShow(Sender: TObject);
- procedure FormHide(Sender: TObject);
- procedure OKBtnClick(Sender: TObject);
- private
- { Private declarations }
- public
- AliasName: TSymbolStr;
- AliasType: TSymbolStr;
- end;
-
- var
- OpenDbDlg: TOpenDbDlg;
-
- implementation
-
- {$R *.DFM}
-
- procedure TOpenDbDlg.FormShow(Sender: TObject);
- begin
- AliasList.Active := True;
- OKBtn.Enabled := AliasList.RecordCount > 0;
- end;
-
- procedure TOpenDbDlg.FormHide(Sender: TObject);
- begin
- AliasList.Active := False
- end;
-
- procedure TOpenDbDlg.OKBtnClick(Sender: TObject);
- begin
- AliasName := AliasListNAME.Value;
- AliasType := AliasListDBTYPE.Value;
- ModalResult := mrOK;
- end;
-
- end.
-