I start sqlite3.exe from windows which opens up a command prompt. I create a table etc, fine. Now if I .exit or .quit I get no message...

How It Works

Get an answer in three easy steps. Here's how it works...

Ask Your Question

1. Ask Your Question

Enter your SQLite question at the top of this page and click Get An Answer.

Pick Your Priority

2. Pick Your Priority

Tell us how quickly you want your SQLite question answered.

Get An Answer

3. Get An Answer

Connect with your programmer via online chat or telephone call.

Answer

Customer
I start sqlite3.exe from windows which opens up a command prompt. I create a table etc, fine. Now if I .exit or .quit I get no message asking what I want to call my database and no database is created. I have looked on .help and searched t'internet, but cannot find any save function (nor a load function). I am assuming that this basic? feature is missing (by design?) and I have to always use sqlite3.exe from the command line. If this is true, why? [I know I can use a 3rd party gui for creating new databases.] Regards Gordon Moore
Last updated
srl309
Programmer
run the program like sqlite3 mydb.db This will load and create a database called mydb if it doesn't exist http://www.sqlite.org/sqlite.html without a name for the database i think the data is lost when you close the connection[hr] you can also use the C API to run queries http://www.sqlite.org/capi3ref.html sqlite3 * db; sqlite3_open("test.db", & db); people have wrappers to allow this to run in different languages http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers
Last updated
gatsu
Programmer
I dont get it, how do I "run the program like sqlite3 mydb.db" ? I'm using widows. [img]http://www.tibiatrader.com/2.jpg[/img]
Last updated
Customer
[quote='Gatsu' pid='164' dateline=' ***-***-**** '] I dont get it, how do I "run the program like sqlite3 mydb.db" ? I'm using widows. [img]http://www.tibiatrader.com/2.jpg[/img] [/quote] The simple answer is that though sqlite3 can be instantiated (run) from windows it does not allow you to add the necessary file name. Neither does sqlite3 allow you to create or save a newly created database file from within its prompt (i.e. something like .save, .close, .open, does not exist). The only solution is that you run it from a Dos or command prompt. In win7 you can just right click (or shift right click) on the folder in the tree view of windows explorer and it has an option to open command prompt here. There is an addon somewhere on the web that allows XP to do the same, but I forget where. It would be nice for someone to extend sqlite3.exe to allow this functionality from windows. :) btw when you are in a command prompt with a huge path and the ">" you can shorten this to just ">" by typing blah\blah\blah\>prompt $g you can get your full path back by typing >prompt $p$g Oh the memories of MS-Dos :)
Last updated
gatsu
Programmer
thank you, that works
Posted

quoteTestimonialsquote

About ExpertHelp

ExpertHelp is changing the way you connect with service professionals.

Whether you have a quick question while preparing your taxes, troubleshooting a computer problem, or need to hire an attorney, ExpertHelp is the most convenient and affordable way to connect with the right service professional to get the job done.

ExpertHelp has been in business since 2011, is an A+ Rated Better Business Bureau accredited member, and offers a 100% satisfaction guarantee on every question you ask!

More SQLite Questions...

Ask Your SQLite Question & Get An Answer Now!