green field

Using SQLite

Rate this Content 1 Votes

Since SQLite is a file based database, we ship a set of release files fully configured with a database file that is already loaded with default data. All you have to do is setup the web, make the Data folder writable and you're ready to go. You can edit the content of the site after you login.

The instructions below are only here in case you want to create your own database instead of using the one included.

The preconfigured db, mojo.db.config, is located at WebRoot/Data/sqlitedb/
In the same folder you will also find the sqlite3.exe command line tool for Windows.

Open a command prompt and cd into this folder

To create a new database:

type sqlite3.exe yournewdbname.db.config

next while at the sqlite prompt type:

.read initdb.config

this will initialize the database,

You'll need to put the full path to
this file in the SqliteConnectionString in the Web.config

then you should visit /Setup/Default.aspx to run the sql scripts.

Control C will exit the sqlite prompt.

Note that the use of .config for the db name is only to make the file protected by ASP.NET so it can't be requested using http.

IIS 7 64 bit Issue

When trying to use SQLite under 64 bit Vista or Win 2008 server with IIS 7, you may get an error about an invalid file in relation to the sqlite3.dll because it is a 32 bit dll. You can resolve this in IIS by going to the advanced properties of the application pool and setting "Allow 32 bit apps" to true.

Web Hosting by mojoPortal Experts Your advertisement here xSQL Software SQL Tools
Form Wizard Pro - Easy Forms and Surveys for mojoPortal