This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I'm trying to setup lightspeed to use Sqlite in a WPF application, and I need a little guidance. I have my lightspeed project connecting to SQLite appropriately, but I want the application to create the database on demand. How do I convince LightSpeed to create a new database on the fly 'model first-style'... Through code? What am I doing wrong? ---Example--- Step1: Do NOT create the database sample.db3 Step2: Execute the following code:
Step3: (doesn't work - throws exception) The application has created sample.db3, created the 'blog table', and stuffed the new "myTitle" entry. |
|
|
LightSpeed expects the database and schema to already be present at runtime and we dont create the schema if its not present. If you need this created a runtime you should have a look at using the migration capabilities in LightSpeed to create a migration for creating the database and then execute it as required. Have a read through http://www.mindscapehq.com/documentation/lightspeed/Database-Migrations for details on using migrations with LightSpeed. If you just need to perform this as a one time concern you can use the designer to generate a new database by applying the connection string for the file in the designer and then performing an "Update Database" action from the right click context menu.
|
|