home *** CD-ROM | disk | FTP | other *** search
- unit Main;
-
- { Program copyright (c) 1994 by Charles Calvert }
- { Project Name: FIELDER }
-
- interface
-
- uses
- WinTypes, WinProcs, Classes,
- Graphics, Forms, Controls,
- StdCtrls, DB, DBTables;
-
- type
- TForm1 = class(TForm)
- ListBox1: TListBox;
- bFields: TButton;
- ListBox2: TListBox;
- bCurRecord: TButton;
- Table1: TTable;
- procedure bFieldsClick(Sender: TObject);
- procedure bCurRecordClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.bFieldsClick(Sender: TObject);
- var
- i: Integer;
- begin
- ListBox1.Clear;
- for i := 0 to Table1.FieldCount - 1 do
- ListBox1.Items.Add(Table1.Fields[i].FieldName);
- end;
-
- procedure TForm1.bCurRecordClick(Sender: TObject);
- var
- i: Integer;
- begin
- ListBox2.Clear;
- for i := 0 to Table1.FieldCount - 1 do
- ListBox2.Items.Add(Table1.Fields[i].AsString);
- end;
-
- end.
-