Dan Baker wrote: > I been reading this list for several days, but just started using it today. > > I'm using it as an embedded database (on Windows), and want to be able to > create the initial database from within my app -- meaning, I don't want to > ship a database file. > > What is the recommended method for creating a new database file from within > my app? (I looked for an SQL statement, but failed to find something like > "CREATE DATABASE mydb") > > I'm thinking of the following solutions: > 1) Create a database with a small known table in it via sqlite.exe, and > storing that file in my app (as a resource), and then copying that file to > disk to "create a new database". (Then, I could drop the known small table). > > 2) Ship the sqlite.exe app, and launch it with the appropriate cmd line > parameters to create the database. > > SQLite looks fantastic!
Nemanja's recommendation is definitely the best. Microsoft also has some good resources on doing an initial database installation and creation if you search on msdn.microsoft.com (install and SQL Server). While they were speaking in the context of SQL Server, I found that what they said applied very well to SQLite. Clay Dowling -- CeaMuS http://www.ceamus.com Simple Content Management