Page 1 of 1

How to use an uniDAC dynamic Create Data Table.

Posted: Tue 24 Nov 2009 11:24
by Lanny75
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.

Posted: Wed 25 Nov 2009 09:29
by Plash
UniDAC does not have such method. You should create table using a SQL statement.