home *** CD-ROM | disk | FTP | other *** search
/ Delphi 4 Bible / Delphi_4_Bible_Tom_Swan_IDG_Books_1998.iso / source / SQLPLAY / OPEN.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-03-16  |  924 b   |  47 lines

  1. unit Open;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, Db, DbTables;
  8.  
  9. type
  10.   TOpenForm = class(TForm)
  11.     OKBtn: TBitBtn;
  12.     CancelBtn: TBitBtn;
  13.     Bevel1: TBevel;
  14.     ComboBox1: TComboBox;
  15.     Label1: TLabel;
  16.     Bevel2: TBevel;
  17.     Label2: TLabel;
  18.     ComboBox2: TComboBox;
  19.     procedure FormActivate(Sender: TObject);
  20.     procedure ComboBox1Change(Sender: TObject);
  21.   private
  22.     { Private declarations }
  23.   public
  24.     { Public declarations }
  25.   end;
  26.  
  27. var
  28.   OpenForm: TOpenForm;
  29.  
  30. implementation
  31.  
  32. {$R *.DFM}
  33.  
  34. procedure TOpenForm.FormActivate(Sender: TObject);
  35. begin
  36.   Session.GetAliasNames(ComboBox1.Items);
  37. end;
  38.  
  39. procedure TOpenForm.ComboBox1Change(Sender: TObject);
  40. begin
  41.   Session.GetTableNames(ComboBox1.Text, '*.*',
  42.     False, False, ComboBox2.Items);
  43.   ComboBox2.ItemIndex := 0;
  44. end;
  45.  
  46. end.
  47.