SQLite problems

Discussion in 'Python' started by bayer.justin@googlemail.com, Apr 12, 2007.

  1. Guest

    Hi there,

    I run Python 2.5 on a Mac OS X system with SQLite 3.2.8 installed via
    fink. Today I stumbled over the problem, that the sqlite3 module and
    sqlite3 from fink do not seem to work well together. I brought it down
    to this:

    >>> from sqlite3 import Connection
    >>> c = Connection("foo.bar") # does not yet exist
    >>> c.execute("CREATE TABLE foo (id integer)")
    >>> c.execute("INSERT INTO foo VALUES (1)")
    >>> c.execute("SELECT * FROM foo")
    >>> c.execute("SELECT * FROM foo").fetchmany()

    [(1,)]
    >>> c.execute("INSERT INTO foo VALUES (2)")
    >>> c.execute("SELECT * FROM foo").fetchmany(2)

    [(1,), (2,)]

    Then in sqilte:

    $ sqlite3 foo.bar
    SQLite version 3.2.8
    Enter ".help" for instructions
    sqlite> select * from foo;
    SQL error: unsupported file format


    If I create the database file with sqlite and open it from within
    python, I cannot run any queries on that database, but no error is
    thrown - it just passes silently.

    Any ideas?

    Regards,
    -Justin
     
    , Apr 12, 2007
    #1
    1. Advertising

  2. Guest


    > I run Python 2.5 on a Mac OS X system with SQLite 3.2.8 installed via
    > fink.



    Why fink ?, it is very easy to make sqlite. download the source,
    configure, make and install from terminal
     
    , Apr 12, 2007
    #2
    1. Advertising

  3. writes:

    > Hi there,
    >
    > I run Python 2.5 on a Mac OS X system with SQLite 3.2.8 installed via
    > fink. Today I stumbled over the problem, that the sqlite3 module and
    > sqlite3 from fink do not seem to work well together. I brought it down
    > to this:
    >
    > Any ideas?


    miss-match of versions between the fink and the Apple-supplied sqlite3?


    >
    > Regards,
    > -Justin
    >


    --
    Kirk Job Sluder
     
    Kirk Job Sluder, Apr 12, 2007
    #3
  4. Guest

    > Why fink ?, it is very easy to make sqlite. download the source,
    > configure, make and install from terminal


    I did so and now I have the latest sqlite version. But it did not make
    a difference.
     
    , Apr 12, 2007
    #4
    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. rdrink

    sqlite 'ownership' problems

    rdrink, Sep 3, 2006, in forum: Python
    Replies:
    1
    Views:
    278
    Istvan Albert
    Sep 3, 2006
  2. Darrin Thompson

    Build problems with sqlite on OSX

    Darrin Thompson, May 28, 2007, in forum: Python
    Replies:
    0
    Views:
    274
    Darrin Thompson
    May 28, 2007
  3. kimwlias
    Replies:
    1
    Views:
    2,747
    Jon Clements
    Feb 1, 2009
  4. Carl Youngblood
    Replies:
    1
    Views:
    261
    Carl Youngblood
    Apr 9, 2005
  5. Replies:
    4
    Views:
    372
Loading...

Share This Page