Rob Richardson wrote:
So, I thought I could just issue the following command from inside my
program:

Sqlite3 newdatabase.db .read schemafile.txt

But, when I issue this command from the DOS prompt,  it gives me an
error message saying that there is no command named "read".
Rob,

You can pass your schema command file into sqlite in 3 ways. The first is using the -init option.

   sqlite3 -init schemafile.txt newdatabase.db

The second is using input redirection.

   sqlite3 newdatabase.db < schemafile.txt

The third is supplying a read meta command on the command line. Note, you must quote the command so it gets passed to sqlite as a single string.

   sqlite3 newdatabase.db ".read schemafile.txt"

HTH
Dennis Cote

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to