Hi
Do you have any examples or demo's of creating a new SQLite database programatically through a Delphi application?
I can see how to create tables through code from the BlobPictures demo using:
SQLConnection.ExecuteDirect(
'CREATE TABLE DbxSQLite_BLOB (' +
' id INTEGER PRIMARY KEY,' +
' Name VARCHAR(50),' +
' Picture BLOB' +
')');
But if the SQLite database doesn't exist yet, can one be created through a Delphi XE2 program?
Any help appreciated.
Create SQLite Database Programatically - Example?
-
- Posts: 14
- Joined: Tue 24 Jul 2012 10:45
Re: Create SQLite Database Programatically - Example?
hello,
SQLite - is a file DB, therefore "Database" means a file on a disk. If you specify in the Database property of SQLConnection the path and name of a new non-existent file, the DB file will be created in the specified path and with the specified name automatically.
SQLite - is a file DB, therefore "Database" means a file on a disk. If you specify in the Database property of SQLConnection the path and name of a new non-existent file, the DB file will be created in the specified path and with the specified name automatically.