Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > sqlite 'ownership' problems

Reply
Thread Tools

sqlite 'ownership' problems

 
 
rdrink
Guest
Posts: n/a
 
      09-03-2006
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

 
Reply With Quote
 
 
 
 
Istvan Albert
Guest
Posts: n/a
 
      09-03-2006
rdrink wrote:

> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby sqlite/gem error: Could not load sqlite adapter jhs408@gmail.com Ruby 4 04-18-2009 12:53 AM
Problems installing PySQLite, SQLite and Trac kimwlias Python 1 02-01-2009 05:51 PM
Build problems with sqlite on OSX Darrin Thompson Python 0 05-28-2007 05:06 PM
SQLite problems bayer.justin@googlemail.com Python 3 04-12-2007 09:29 PM
Installing sqlite-ruby when sqlite is in non-standard location Carl Youngblood Ruby 1 04-09-2005 03:32 AM



Advertisments