pysqlite2.dbapi2.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 0, and there are -1 supplied.

F. GEIGER f.geiger at vol.at
Tue May 17 15:17:13 EDT 2005


Arrgh, sorry for that post!

      self._dbc.execute(q, data)

where data is None, works with MySQL. For SQLite I have to write

      if data is not None:
         self._dbc.execute(q, data)
      else:
         self._dbc.execute(q)

Sorry again,
Franz GEIGER



"F. GEIGER" <f.geiger at vol.at> schrieb im Newsbeitrag
news:d6dfi8$ck8$1 at news.hispeed.ch...
> Im on Python 2.3.4, using pysqlite 2.0.0 (final).
>
> When I try to execute
>
> self._dbc.execute(q, data)
>
> where q is 'select count(*) from Difflets ' and date is None
>
> I get the following exception:
>
> pysqlite2.dbapi2.ProgrammingError: Incorrect number of bindings supplied.
> The current statement uses 0, and there are -1 supplied.
>
> Any ideas?
>
> Many thanks in advance and kind regards
> Franz GEIGER
>
>
>





More information about the Python-list mailing list