How to use an uniDAC dynamic Create Data Table.

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Lanny75
Posts: 1
Joined: Tue 24 Nov 2009 11:09

How to use an uniDAC dynamic Create Data Table.

Post by Lanny75 » Tue 24 Nov 2009 11:24

I want to use an uniDAC dynamic create a table, the CreateTable method in similar TTable. Example code such as:

Code: Select all

with untbl1 do
  begin
    Active := False;
    TableName := 'tbl_test';
    //FieldDefs.Update;
    with FieldDefs do
    begin
      Update;
      Clear;
      with AddFieldDef do
      begin
        Name := 'aField1';
        DataType := ftInteger;
        Required := True;
      end;
      with AddFieldDef do
      begin
        Name := 'aField2';
        DataType := ftString;
        Size := 30;
      end;
      Updated := False;
    end;
    // ... how to 
  end;
thx.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 25 Nov 2009 09:29

UniDAC does not have such method. You should create table using a SQL statement.

Post Reply