Create Database

Discussion of open issues, suggestions and bugs regarding LiteDAC (SQLite Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jbmiller
Posts: 12
Joined: Wed 30 May 2012 21:33

Create Database

Post by jbmiller » Thu 23 Aug 2012 16:42

Ok, I'm stumped. In other posts, it looks like if a SQLite database file doesn't exist, it will be created when the connection component connects. All I get is an error that says the db file doesn't exist.

So, what's the key to creating a database?

Thanks,
Bill

TomekC
Posts: 8
Joined: Mon 20 Aug 2012 11:36
Location: Poland

Re: Create Database

Post by TomekC » Fri 24 Aug 2012 06:04

Hi.
TLiteConnection.Options.ForceCreateDatabase

ZEuS
Devart Team
Posts: 240
Joined: Thu 05 Apr 2012 07:32

Re: Create Database

Post by ZEuS » Mon 27 Aug 2012 07:53

Yes, in order to create a new database when establishing a connection, you have to set the TLiteConnection.Options.ForceCreateDatabase property to True.
We have added this property to provide an ability to avoid common mistakes when the path to the database is entered incorrectly, so that a new database is created, and the application starts to work improperly.

jbmiller
Posts: 12
Joined: Wed 30 May 2012 21:33

Re: Create Database

Post by jbmiller » Mon 27 Aug 2012 16:39

That looks like it did it.

Is there a way to view documentation other than through Delphi Help? IBDac was installed along with SQLite. It appears that I'm only getting the IBDac help because the force create option is not listed in the help.

Thanks,
Bill

ZEuS
Devart Team
Posts: 240
Joined: Thu 05 Apr 2012 07:32

Re: Create Database

Post by ZEuS » Wed 29 Aug 2012 07:06

You can open LiteDAC documentation using the "LiteDAC -> LiteDAC Help" menu in Delphi IDE.
If you are using a version of Delphi since Delphi 2005, please make sure that either "No Filter" or "Devart Documentation" filter is set in the help window.
Also, you can download a separate LiteDAC documentation in pdf and chm formats from our web-site: http://www.devart.com/litedac/download.html .

Post Reply