[Lazarus] Make table with TDataset structure
Michael Van Canneyt
michael at freepascal.org
Wed Jun 10 16:08:42 CEST 2015
On Wed, 10 Jun 2015, aradeonas wrote:
> Hi,
>
> I want to make MySQL table from a TDataset structure,is there any ready to use tool?
> An example case :
> We have many SQLite DBs and want to convert them to MySQL and other than convert tools we can make TDataset from SQLite and
> generate fields automatically and then make DDL MySQL from TDataset and then run it and in the end insert all the data.
>
> In summery I want to make table create code form Dataset structure.
You can use the FPC data dictionary routines in fpdatadict:
TDDTableDef has ImportFromDataset
and then you can use
TFPDDSQLEngine.CreateCreateSQL
to create a CREATE TABLE SQL statement.
Michael.
More information about the Lazarus
mailing list