sqlite 'ownership' problems

R

rdrink

I will try to keep this as suscinct as possible as it might be an
obvious Q.....
I am just getting into Py/sqlite (with a fair amount of PHP/MySQL
background), and am posting this as much for the other noobs as
myself....
I started learning sqlite by tinkered around at the command line:
creating db's, tables, populating them. etc. All fine.
Then I moved to Python.. and immediately noticed that for a db I had
created at the cmnd-line, e.g. 'test.db' with a table 'foo', I would
get the error "_sqlite.DatabaseError: no such table: foo". My suspition
was that this is a "feature" of sqlite ('flat file' vs. a dynamic db in
MySQL) where sqlite is 'sensetive' to who creates it... Which seems to
be borne out by that fact that I have since written one Py script (in
IDLE) which creates and populates a db, and another that can retrieve
the data. But...

Now I have moved on to Blender (w/Python), and seem to be up against
the same problem, same error.
(And yes I could prolly just run the whole thing within Blender/Py. But
then why use a database? The whole point is to do my mass calculations
(which take about 20 minutes) in IDLE, stuff all that into a database.
and then just access that data via Py/sqlite.)

I suspect that the answer lies within using sqlites "network"
abilities... but as a noob I don't even know where to start... So
advice/examples would be greatly appreciated.

rd
 
I

Istvan Albert

rdrink said:
created at the cmnd-line, e.g. 'test.db' with a table 'foo', I would
get the error "_sqlite.DatabaseError: no such table: foo". My suspition
was that this is a "feature" of sqlite ('flat file' vs. a dynamic db in
MySQL) where sqlite is 'sensetive' to who creates it...

Most likely you do not operate on the same database file. Connecting
to a sqlite database will create the underlying database file if it
does not exist at the path you've specified.

i.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top