'SQLite3.exe shell not successfully creating database?

I am trying to create a sqlite3 database on my windows 7 64 bit machine. I have downloaded sqlite-shell-win32-x86-3071700.zip from http://www.sqlite.org/download.html . After running the sqlite3.exe on my Desktop, I ran the following:

sqlite > sqlite3 mytest.db

after I pressed enter it just printed out

... >

Unable to create sqlite3 database on windows 7 64 bit machine

I noticed someone had a similar problem has me so I tried running it through the Windows command prompt. However I still got the same output

.... >

When I use a semicolon after mytest.db I get the error the guys gets in the above link, even in the Windows command prompt.

Any help is appreciated.

Thanks in advance.



Solution 1:[1]

sqlite3 mytest.db ""

See those "" at the end - they are needed if you want to create empty database

For Powershell use sqlite3 mytest.db " " Powershell needs space between " "

Solution 2:[2]

Your problem seems to be that you're trying to run sqlite at the sqlite prompt. Don't do that.

You just need to run SQLite3 and give it a database name at the Windows command prompt. Here's what it looks like on my computer, starting SQLite3 and creating a new database (test.db).

$ sqlite3 test.db
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> 

At the sqlite> prompt, you can use SQLite's SQL-like language to create and manipulate database objects.

sqlite> create table test (test_id integer primary key);
sqlite> insert into test values (1);
sqlite> select * from test;
1

Solution 3:[3]

Had the same problem, I was running the sqlite3.exe in Windows 10 but noticed the $ before the command given by Mike's example, so the issue was I had to 'get out' the sqlite system commands.

Just run:

.shell sqlite3 test.db

This allow you to run CMD ARGS.

Then check by doing:

.databases

Solution 4:[4]

When you try to create DB if any permission issue exists then,That creation process cannot be completed.That time ...> symbol will be shown. So Solution is,In comand prompt specify the root directory where to create DB file,Example code is here,

C:> cd d:\

C:> d:

d:>cd sqlite

d:\sqlite>sqlite3 testDb.db

SQLite version 3.8.2 2013-12-06 14:53:30 Enter ".help" for instructions Enter SQL statements terminated with a ";"

sqlite> .databases

seq name file


0 main d:\sqlite\testDB.db

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Mike Sherrill 'Cat Recall'
Solution 3 karkanis
Solution 4 user2114068