.NET Zip component, Delphi Zip component, Barcode .NET, BDE Replacement and other .NET and Delphi components from ComponentAce
Products Download Order Contact us

Search
 

Delphi/C++ Components
.NET Components
ActiveX Controls
Kylix Components

Download

Download
Download Commercial
Trial Limitations

Support

Submit Request
Support Options

Order

Purchase
Competitive Upgrade
Premium Support
Sales Policy
Upgrade Policy
License Types

Info

News
Mailing List
Articles
Testimonials



About Us
Partners
Links
Contact Us
Link to Us





Home > Delphi/C++ Components > Absolute Database > Create Table Delphi Example

Absolute Database

Overview | Features | Requirements | Testimonials | SQL Samples | Code Samples | Screenshots | See Also | Download | Order
Create Table Delphi Example
Illustrates creating table with Query and Table components

Download Absolute Database | Learn more

unit Main;

interface
{$I CompVer.inc}

uses
{$IFDEF D6H}
  Variants,
{$ENDIF}
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
  Dialogs, DB, ABSMain, Grids, DBGrids, StdCtrls;

type
  TForm1 = class(TForm)
    DBGrid1: TDBGrid;
    DataSource1: TDataSource;
    Table: TABSTable;
    GroupBox1: TGroupBox;
    rbTable: TRadioButton;
    rbQuery: TRadioButton;
    Button1: TButton;
    Label1: TLabel;
    Query: TABSQuery;
    mSQL: TMemo;
    GroupBox2: TGroupBox;
    Label2: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure rbQueryClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  Table.Close;
  if rbQuery.Checked then
   begin
    Query.SQL.Text := mSQL.Text;
    Query.ExecSQL;
    Table.Open;
   end
  else
   begin
    if Table.Exists then Table.DeleteTable;
    Table.FieldDefs.Clear;
    Table.FieldDefs.Add('id',ftAutoInc,0,False);
    Table.FieldDefs.Add('name',ftString,20,False);
    Table.CreateTable;
    Table.Open;

    Table.Append;
    Table.FieldByName('name').AsString := 'John';
    Table.Post;
   end;
end;

procedure TForm1.rbQueryClick(Sender: TObject);
begin
  mSQL.Enabled := rbQuery.Checked;
end;

end.



Create Table Delphi Example
Download Absolute Database | Learn more


Product Info


Current version: 7.95
Released: February 08, 2023
Price: $ 149

downloadorder


Our Customers



Testimonials

We made three requests of the technical support personnel and despite the fact that these were all implementation questions (not bugs in their software) we received support within 24 hours. It is rare to get such good customer support these days and I really appreciate everything ComponentAce has done for us.

Jason Goodridge, Development Manager

        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Oct 07, 2024