home *** CD-ROM | disk | FTP | other *** search
/ Chip: Shareware for Win 95 / Chip-Shareware-Win95.bin / ostatni / delphi / delphi2 / dscol.exe / 16BIT / FDSCDEMO.PAS < prev    next >
Pascal/Delphi Source File  |  1996-10-05  |  1KB  |  59 lines

  1. unit Fdscdemo;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, DB, Dscol, DBTables, StdCtrls, DBCtrls, Grids, DBGrids,
  8.   ExtCtrls;
  9.  
  10. type
  11.   TForm1 = class(TForm)
  12.     Panel1: TPanel;
  13.     Panel2: TPanel;
  14.     DBGrid1: TDBGrid;
  15.     DBNavigator1: TDBNavigator;
  16.     Button1: TButton;
  17.     ColumnsDataSource1: TColumnsDataSource;
  18.     Table1: TTable;
  19.     Table1EmpNo: TStringField;
  20.     Table1LastName: TStringField;
  21.     Table1FirstName: TStringField;
  22.     Table1PhoneExt: TStringField;
  23.     Table1HireDate: TDateTimeField;
  24.     Table1Salary: TFloatField;
  25.     Table1Boss: TStringField;
  26.     procedure FormCreate(Sender: TObject);
  27.     procedure Button1Click(Sender: TObject);
  28.     procedure FormDestroy(Sender: TObject);
  29.   private
  30.     { Private declarations }
  31.   public
  32.     { Public declarations }
  33.   end;
  34.  
  35. var
  36.   Form1: TForm1;
  37.  
  38. implementation
  39.  
  40. {$R *.DFM}
  41.  
  42. procedure TForm1.FormCreate(Sender: TObject);
  43. begin
  44.   ColumnsDataSource1.SetupColumns;
  45.   Table1.Open;
  46. end;
  47.  
  48. procedure TForm1.Button1Click(Sender: TObject);
  49. begin
  50.   ColumnsDataSource1.ShowFieldsDlg;
  51. end;
  52.  
  53. procedure TForm1.FormDestroy(Sender: TObject);
  54. begin
  55.   Table1.close;
  56. end;
  57.  
  58. end.
  59.