SQLite problems

B

bayer.justin

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
 
M

martin.laloux

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
 
K

Kirk Job Sluder

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?
 
B

bayer.justin

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.
 

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,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top