⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.pas

📁 《Delphi开发人员指南》配书原码
💻 PAS
字号:
unit Main;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

uses DB, DBTables;

procedure TForm1.Button1Click(Sender: TObject);
begin
  with TTable.Create(Self) do begin       // create TTable object
    DatabaseName := 'c:\temp';            // point to directory or alias
    TableName := 'FOO';                   // give table a name
    TableType := ttParadox;               // make a Paradox table
    with FieldDefs do begin
      Add('Age', ftInteger, 0, True);     // add an integer field
      Add('Name', ftString, 25, False);   // add a string field
      Add('Weight', ftFloat, 0, False);   // add a floating-point field
    end;
    { create a primary index on the Age field... }
    IndexDefs.Add('', 'Age', [ixPrimary, ixUnique]);
    CreateTable;                          // create the table
  end;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -