sqlite 'ownership' problems
I will try to keep this as suscinct as possible as it might be an
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
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.
Re: sqlite 'ownership' problems
> 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.
|All times are GMT. The time now is 11:21 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.