Page 1 of 1

creating tables in sqlite at design time

Posted: Tue 18 May 2010 15:02
by sandy771
Not sure if I am missing something here.

I have connected a MyConnection to sqlite3.dll I now want to craete three tables and connect a unitable to them - I can add the relevant fields to the table and have added "SELECT * FROM Decon" to the tables properties but when I trya nd make the table active I get an error table does not exist. What am I doing wrong?

Once I have craeted and populated my table I will want to save it as an sqlite.db file - how do I go about this?

Thanks.

Posted: Wed 19 May 2010 09:59
by bork
Hello

As I understand you don't have tables in the your database. At first you should execute a query to create tables. And after executing this query only you can attach TUniTable or TUniQuery to these tables.

Posted: Wed 19 May 2010 10:03
by sandy771
Thanks Bork

I had worked that out - I was just being dull.

However I have another question - I will want to load and save sqlite database files as .db files. Is there a method to do this in uniDac?

Posted: Thu 20 May 2010 09:20
by bork
To connect to SQLite database you should add TUniConnection and TSQLiteUniProvider to your application. Also you should set the ProviderName property to "SQLite" and the Database property to the path to your .db file. After these actions you can open SQLite database by calling the Open method or setting the Connected property to True.