Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

SQLite database problem

  1. Sep 25, 2013 #1
    hi everyone , i downloaded SQLite files , i have in c:\windows\system32\sqlite 3 files:
    1- sqlite.exe

    my problem is that i can't create a database or open the one i created by the administrative tools ..

    as one of the website said that the way to create a database is :
    At a shell or DOS prompt, enter: "sqlite3 test.db". This will create a new database named "test.db". (You can use a different name if you like.)

    i wrote on a DOS prompt ( command prompt ) and it still say the same message " SQLITE3 is not recognized as an internal or external command,operable program or a batch file .

    need help to figure out what is wrong ... thank u all
  2. jcsd
  3. Sep 25, 2013 #2


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    You probably just need to include the directory for the executable in your path. In your DOS window, type the SET command to see your current variables. I would bet that c:\windows\system32\sqlite is not in your PATH variable. To temporarily add it, type the following:

    PATH = %PATH%;c:\windows\system32\sqlite

    You should see that it's been added to your path. Now try running the command to create the database.
  4. Sep 25, 2013 #3
    i did these steps and still can't create a database on windows vista

    [PLAIN]http://www.gulfup.com/?xUhNzI [Broken][/PLAIN]

    here i wrote the path and the name of the path

    [PLAIN]http://www.gulfup.com/?4x6KbD [Broken][/PLAIN]

    this one for dos command

    [PLAIN]http://www.gulfup.com/?9PriK3 [Broken][/PLAIN]

    here i tried to create a database but it is not working

    [PLAIN]http://www.gulfup.com/?XPlItZ [Broken][/PLAIN]

    any help ?

    thank u alot
    Last edited by a moderator: May 6, 2017
  5. Sep 25, 2013 #4


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    I never mentioned making changes to the environment variables. I told you to open a DOS window. Remove what you put there and enter the commands in a DOS window as I stated in my other post. You can eventually put them in the environment variables but not like that. I'm nervous about explaining how at this point because I don't want to see you wreck your computer. Whenever you make changes to the environment variables - back up anything that you change before you change it. You can cause serious problems if you don't know what you're doing.

    As I wrote before:

    In your DOS window, type the SET command to see your current variables.

    Examine the Path variable.

    If c:\windows\system32\sqlite is not there, enter the following:
    PATH = %PATH%;c:\windows\system32\sqlite

    Type the set command again. You should see that it's been added to your path.

    Try to run the sqllite3 command again. It should at least find the program now.
  6. Sep 25, 2013 #5


    User Avatar

    Staff: Mentor

    Or start your command prompt session with "cd c:\windows\system32\sqlite".

    Looks like you successfully started sqlite - have you tried to enter .help command, as suggested?
    Last edited by a moderator: May 6, 2017
  7. Sep 26, 2013 #6
    You should be not working in the root C:\ directory, nor the C:\...\system32 directory.
    You have a great chance of deleting important files to make your machine run correctly.

    In the DOS shell, make a new directory at the root C:\ using the MD ( make directory ) command. Call it something like SQLiteTST.
    You will type MD C:\SQLiteTST
    Copy the 3 files that you listed in your first post to that directory.
    Using the change directory command CD at the root C:
    You will type CD C:\SQLiteTST.
    Do a Dir command to make sure you are in the SQLiteTST directory.
    Look at the prompt which should now be C:\SQLiteTST as a second check that you are in the correct directory.
    You can work in this new directory C:\SQLiteTST all you want.

    Now run your sqlite3 test.db, and you should be OK.
    All your files will be produced in that directory.

    Much easier to transfer the files: You can also use the Windows GUI to make the new directory C:\SQLiteTST and transfer ( do a copy and paste rather than a cut and paste ) the 3 files rather than from the DOS shell as that would be simpler. But, when in the DOS shell at the C:\prompt you still need to do the change directory command C:\SQLiteTST to get you into that directory.

    Until you get more familiar to how SQLite works and how DOS works, if you make all your testing in tha tone directory, you will have less chance of screwing up your machine and of having files being put all over the place.
  8. Sep 28, 2013 #7
    thank you all for helping me .. i did the steps and it worked .. I downloaded sqlite expert professional ... where can i find the tutorial or the explanation how to use it ?
    thank u all
    Last edited: Sep 28, 2013
  9. Sep 28, 2013 #8


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    sqlite tutorials
  10. Sep 28, 2013 #9
    Thank u.. i did alot of search about how to connect sqlite database with html ( dreamweaver 8 ) and found nothing clear .. any help , please ?

    Appreciate your help ..
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook