Hello all,
Perhaps I'm missing something even though I've googled for the past few days on this...
I'm trying to relearn SQL by playing around with sqlite3 (version 3.6.11) (running puppy 4.2.1). All goes well: I can create databases, tables, insert, select, yadda-yadda. However, when I try to go back to open the db and work in the table, I get "SQL error: no such table <table name>".
I thought "foo.db" at the prompt would retrieve it, but no, and there doesn't seem to be an "open" command for sqlite. Am I going to have to install a sqlite manager to do anything further? I was hoping to do everything from the command line.
Thanks in advance for any and all suggestions.
Unable to open database in SQLite3
- spongedaddy
- Posts: 46
- Joined: Wed 03 Jun 2009, 01:47
- Location: Winter Park, FL
- Contact:
You should be able to work from the command line. Where did you save your database? Is it actually there? Maybe you need to include the path.
Just as a side note, you may want to take a look at sqlitestudio. It's very good.
http://sqlitestudio.one.pl/index.rvt
Just as a side note, you may want to take a look at sqlitestudio. It's very good.
http://sqlitestudio.one.pl/index.rvt
- spongedaddy
- Posts: 46
- Joined: Wed 03 Jun 2009, 01:47
- Location: Winter Park, FL
- Contact:
Thanks, hillside --
I've saved it in its own directory "~/my-applications/database/test", but when I include the path, I still get "Unable to open database file."
In the meantime, I've loaded sqlitestudio, which I'm playing around with and having a bit of success. Still, the fact that I can't use the command line for this has me puzzled.
I've saved it in its own directory "~/my-applications/database/test", but when I include the path, I still get "Unable to open database file."
In the meantime, I've loaded sqlitestudio, which I'm playing around with and having a bit of success. Still, the fact that I can't use the command line for this has me puzzled.
I think I see the problem.
If you've moved it to it's own directory, you have to include the path and sqlite
doesn't seem to recognize the ~ shorthand. I did some testing and found that
sqlite finds my file if I start the program with:
sqlite3 /root/my-documents/mytest.db
I think if you either put your file in /root or include the entire path to the file,
you'll be able to open it and use it as you normally would at the command line.
Not recognizing the ~ shorthand is something that I've noticed in other programs
also.
If you've moved it to it's own directory, you have to include the path and sqlite
doesn't seem to recognize the ~ shorthand. I did some testing and found that
sqlite finds my file if I start the program with:
sqlite3 /root/my-documents/mytest.db
I think if you either put your file in /root or include the entire path to the file,
you'll be able to open it and use it as you normally would at the command line.
Not recognizing the ~ shorthand is something that I've noticed in other programs
also.
I just did some further testing and found that sqlite DOES recognize the ~
shorthand. So, now I'm stumped about your problem -- unless maybe you type
as poorly as I do, in which case maybe it's just a typo in your path as you
enter it. That's one of the problems I have with the command line. Every little
fat finger error turns into a federal case!
Good luck.
shorthand. So, now I'm stumped about your problem -- unless maybe you type
as poorly as I do, in which case maybe it's just a typo in your path as you
enter it. That's one of the problems I have with the command line. Every little
fat finger error turns into a federal case!
Good luck.
- spongedaddy
- Posts: 46
- Joined: Wed 03 Jun 2009, 01:47
- Location: Winter Park, FL
- Contact:
Thanks again, hillside.
I've also been doing some tinkering on my own, but unlike you it has been to no avail. And my typing is impeccable
I'll keep chipping away at this since I'd much rather work at the cl.
In the meantime, I'm trying to become more comfortable with sqlitestudio -- it's pretty nifty and addictive.
I've also been doing some tinkering on my own, but unlike you it has been to no avail. And my typing is impeccable
I'll keep chipping away at this since I'd much rather work at the cl.
In the meantime, I'm trying to become more comfortable with sqlitestudio -- it's pretty nifty and addictive.