How do I create and open a SQLite database in Windows?

  • Thread starter Thread starter Sumaya
  • Start date Start date
  • Tags Tags
    Database
AI Thread Summary
The discussion centers around troubleshooting issues with SQLite on Windows Vista. The user initially struggles to create or open a database using the command prompt, receiving an error that "sqlite3 is not recognized." The solution involves ensuring that the directory containing the SQLite executable is included in the system's PATH variable. Participants suggest checking the current PATH and adding the SQLite directory if necessary. They recommend creating a new directory specifically for SQLite files to avoid potential issues with system directories. After following these steps, the user successfully runs SQLite commands. The conversation then shifts to seeking tutorials for using SQLite Expert Professional and connecting SQLite databases with HTML in Dreamweaver 8, highlighting a need for clearer resources on these topics.
Sumaya
Messages
29
Reaction score
0
hi everyone , i downloaded SQLite files , i have in c:\windows\system32\sqlite 3 files:
1- sqlite.exe
2-sqlite.dll
3-sqlite.def

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
 
Technology news on Phys.org
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.
 
  • Like
Likes 1 person
i did these steps and still can't create a database on windows vista

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

here i wrote the path and the name of the path

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

this one for dos command

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

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

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

any help ?

thank u alot
 
Last edited by a moderator:
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.
 
Or start your command prompt session with "cd c:\windows\system32\sqlite".

http://im34.gulfup.com/1W6IW.gif

Looks like you successfully started sqlite - have you tried to enter .help command, as suggested?
 
Last edited by a moderator:
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.
 
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:
Sumaya said:
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
sqlite tutorials
 
Thank u.. i did a lot of search about how to connect sqlite database with html ( dreamweaver 8 ) and found nothing clear .. any help , please ?

Appreciate your help ..
 
Back
Top