sqlite 'ownership' problems

Discussion in 'Python' started by rdrink, Sep 3, 2006.

  1. rdrink

    rdrink Guest

    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
    rdrink, Sep 3, 2006
    #1
    1. Advertising

  2. 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.
    Istvan Albert, Sep 3, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian
    Replies:
    0
    Views:
    382
    Brian
    May 3, 2005
  2. Mike

    Tomcat file ownership

    Mike, Feb 28, 2006, in forum: Java
    Replies:
    0
    Views:
    354
  3. David Rasmussen

    Vector and ownership

    David Rasmussen, Jul 11, 2003, in forum: C++
    Replies:
    0
    Views:
    328
    David Rasmussen
    Jul 11, 2003
  4. Carl Youngblood
    Replies:
    1
    Views:
    213
    Carl Youngblood
    Apr 9, 2005
  5. Replies:
    4
    Views:
    336
Loading...

Share This Page