sqlite3 select statement fails with "parameters are of unsupported type

4.7k views Asked by At

I am trying to SELECT a line from an sqlite3 database using a python connector. However, it is generating the error above. The data went into the database with this statement

curs2.executescript("""DROP TABLE IF EXISTS pool4; CREATE TABLE pool4 (COL1 INT, COL2 TEXT)""")

and I am querying with this statement where t is an integer:

ind=curs2.execute("SELECT * FROM pool4 where col1=?", t)

I have tried inserting test integers into the SELECT and the query works (simply ...where col1=1234567) and there seems to be a problem in passing the value to the query. I have verified that t is an integer and also tried retyping it as a string and that generates a different error about bindings.

what is going wrong?.

0

There are 0 answers