Problem with running the database shell through cmd lime

961 views
Skip to first unread message

Arul

unread,
Aug 26, 2009, 5:47:26 AM8/26/09
to Django users
Hi all,

I am using the sqlite database for django application. I need to alter
the table and i tried to use "manage.py dbshell" command. It shows me
"Error: You appear not to have the 'sqlite3' program installed or on
your path."

I tried downloading the sqlite3.exe file and used "sqlite3 c:\project
\mydb.sqlite" command.
It opens an sqlite prompt and allows me to alter the table.

But i need to use it with the django using the "manage.pt dbshell"
command.
I tried adding the sqlite.exe path to the windows system path. It
didnt work.

Please let me know how to acheive this.

Thanks,
Arul

Karen Tracey

unread,
Aug 26, 2009, 8:08:57 AM8/26/09
to django...@googlegroups.com
On Wed, Aug 26, 2009 at 5:47 AM, Arul <arul...@gmail.com> wrote:

But i need to use it with the django using the "manage.pt dbshell"
command.
I tried adding the sqlite.exe path to the windows system path. It
didnt work.

That's how to do it.  Note that changing the system path via the GUI does not affect already-open command prompts so you will need to open a new command prompt or manually do the path update in the command prompt you are using also.

Karen

Arul

unread,
Aug 26, 2009, 9:11:55 AM8/26/09
to Django users
On Aug 26, 5:08 pm, Karen Tracey <kmtra...@gmail.com> wrote:

> That's how to do it.  Note that changing the system path via the GUI does
> not affect already-open command prompts so you will need to open a new
> command prompt or manually do the path update in the command prompt you are
> using also.


I tried with reopening the command prompt after setting the path via
GUI and
also I tried with setting the path in the active command prompt, but
it didnt work.
Anyway if i give "sqlite3" in the command prompt, it gives me the
sqlite prompt.


Thanks,
Arul

Karen Tracey

unread,
Aug 26, 2009, 9:45:51 AM8/26/09
to django...@googlegroups.com
On Wed, Aug 26, 2009 at 9:11 AM, Arul <arul...@gmail.com> wrote:

I tried with reopening the command prompt after setting the path via
GUI and
also I tried with setting the path in the active command prompt, but
it didnt work.
Anyway if i give "sqlite3" in the command prompt, it gives me the
sqlite prompt.


I don't know what to tell you.  Adding the path to sqlite3 works for me:

D:\u\kmt\software\web\playground>sqlite3
'sqlite3' is not recognized as an internal or external command,
operable program or batch file.

D:\u\kmt\software\web\playground>python manage.py dbshell
'sqlite3' is not recognized as an internal or external command,
operable program or batch file.

D:\u\kmt\software\web\playground>dir \tmp\software\sqlite3.exe
 Volume in drive D has no label.
 Volume Serial Number is 2163-D1C1

 Directory of D:\tmp\software

09/22/2008  06:46a             491,908 sqlite3.exe
               1 File(s)        491,908 bytes
               0 Dir(s)   1,382,174,720 bytes free

D:\u\kmt\software\web\playground>set path=d:\tmp\software;%path%

D:\u\kmt\software\web\playground>sqlite3
SQLite version 3.6.3
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .quit

D:\u\kmt\software\web\playground>python manage.py dbshell
SQLite version 3.6.3
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .quit
 
Karen

Arul

unread,
Aug 26, 2009, 10:19:45 AM8/26/09
to Django users
Thanks a lot Karen.

I did the same steps that you followed, it didnt work for me.
But when i tried in another system it works fine.
Probably there is some problem with my system settings.

Thanks,
Arul

Arul

unread,
Aug 27, 2009, 1:56:25 AM8/27/09
to Django users


On Aug 26, 7:19 pm, Arul <aruln...@gmail.com> wrote:

> I did the same steps that you followed, it didnt work for me.
> But when i tried in another system it works fine.
> Probably there is some problem with my system settings.

I found the problem in my machine.It is the version problem.
In django 1.0.2 it was not working. when i upgraded to version 1.1 it
works fine

Thanks,
Arul
Reply all
Reply to author
Forward
0 new messages