pysqlite problem

Fredrik Lundh fredrik at pythonware.com
Wed Mar 1 12:45:34 CET 2006


bapolis at gmail.com wrote:

> I'm getting the following error:
>
> pysqlite2.dbapi2.OperationalError: no such table: tbl1
>
> Here's my code:
>
> from pysqlite2 import dbapi2 as sqlite
> con = sqlite.connect(":memory:", detect_types=sqlite.PARSE_COLNAMES)
> cur = con.cursor()
> cur.execute("select * from tbl1")
> data = cursor.fetchall()
> for record in date:
> record[0], record[1]
>
> my installation versions:
>
> python 2.4.2
> pysqlite 2.0.7
> sqlite 3.3.4
>
> I checked to make sure I have a table called tbl1.

where?

> I don't understand what's going on. Any ideas?

last time I checked, connect(":memory:") creates a new blank database
every time it is called.

</F>






More information about the Python-list mailing list