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

  • Thread starter Sumaya
  • Start date
  • Tags
    Database
In summary, the conversation discusses issues with creating a database using SQLite on a Windows Vista operating system. The expert suggests adding the SQLite directory to the PATH variable and creating a new directory to work in. The user successfully follows these steps and is now looking for tutorials on how to use SQLite Expert Professional and connect SQLite with HTML in Dreamweaver 8. They ask for further assistance on this matter.
  • #1
Sumaya
29
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
  • #2
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
  • #3
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:
  • #4
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.
 
  • #5
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:
  • #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.
 
  • #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:
  • #8
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
 
  • #9
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 ..
 

1. What is an SQLite database?

An SQLite database is a self-contained, serverless, zero-configuration, transactional SQL database engine. It is widely used in mobile and desktop applications as well as in embedded systems.

2. What are some common problems with SQLite databases?

Some common problems with SQLite databases include data corruption, poor performance with large datasets, and limited concurrency support for multiple users.

3. How can I troubleshoot an SQLite database problem?

There are several steps you can take to troubleshoot an SQLite database problem. These include checking for data corruption, optimizing your queries and indexes, and ensuring that you are using the latest version of SQLite.

4. Can I recover data from a corrupted SQLite database?

Yes, it is possible to recover data from a corrupted SQLite database. There are various third-party tools and techniques available for data recovery, but the success of these methods may vary depending on the extent of the corruption.

5. Can I use SQLite for large or complex databases?

While SQLite is capable of handling large and complex databases, it may not be the most efficient option compared to other relational databases. It is best suited for small to medium-sized databases with relatively simple data structures and low concurrency requirements.

Similar threads

  • Programming and Computer Science
Replies
13
Views
3K
  • Programming and Computer Science
Replies
1
Views
658
  • Programming and Computer Science
Replies
1
Views
250
  • Programming and Computer Science
Replies
2
Views
6K
  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
4
Views
5K
  • Programming and Computer Science
Replies
4
Views
2K
  • Programming and Computer Science
Replies
5
Views
2K
  • Programming and Computer Science
Replies
1
Views
5K
Replies
14
Views
2K
Back
Top