Page 1 of 1
Create New DBF Table
Posted: Tue 13 Jun 2017 02:45
by AngelicTech
Hello,
Does anyone have an example sql script to create a new table for a DBF database using UniDac in Direct mode.
Thanks
Re: Create New DBF Table
Posted: Wed 14 Jun 2017 06:50
by MaximG
The standard CREATE TABLE statement, corresponding the SQL-92 standard, is used to create DBF table using UniDAC. The following snippet demonstrates this ability:
Code: Select all
UniConnection.ProviderName := 'DBF';
UniConnection.Database := 'ะก:\DBF';
UniConnection.SpecificOptions.Values['DBFFormat'] := 'dfFoxPro2';
UniConnection.SpecificOptions.Values['Direct'] := 'True';
UniConnection.Connect;
UniConnection.ExecSQL('CREATE TABLE MyTable (ID NUMERIC, Customer CHAR(50), Notes MEMO)');