Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > SQLite problems

Reply
Thread Tools

SQLite problems

 
 
bayer.justin@googlemail.com
Guest
Posts: n/a
 
      04-12-2007
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

 
Reply With Quote
 
 
 
 
martin.laloux@gmail.com
Guest
Posts: n/a
 
      04-12-2007

> 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

 
Reply With Quote
 
 
 
 
Kirk Job Sluder
Guest
Posts: n/a
 
      04-12-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
bayer.justin@googlemail.com
Guest
Posts: n/a
 
      04-12-2007
> 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.

 
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 'ownership' problems rdrink Python 1 09-03-2006 10:54 PM
Installing sqlite-ruby when sqlite is in non-standard location Carl Youngblood Ruby 1 04-09-2005 03:32 AM



Advertisments