will do.

On Mar 23, 4:12 am, Alexey Nezhdanov <snak...@gmail.com> wrote:
> Problem:
>
> (Pdb) print db2db.executesql("call webxdsl.abonsearch (123, 'port_id',
> '41110', '1', ?, ?);")
> *** Error: ('07001', '[07001] [IBM][CLI Driver] CLI0100E  Wrong number of
> parameters. SQLSTATE=07001 (-99999) (SQLExecDirectW)')
> (Pdb) print db2db._execute("call webxdsl.abonsearch (?)",(1,2))
> *** TypeError: <lambda>() takes exactly 1 argument (2 given)
>
> Solution
>
> --- sql.old.py  2010-01-18 17:00:36.000000000 +0300
> +++ sql.py      2010-03-23 12:08:51.374244734 +0300
> @@ -1072,7 +1072,7 @@
>              self._dbname, cnxn = self._uri.split(':', 1)
>              self._pool_connection(lambda : pyodbc.connect(cnxn))
>              self._cursor = self._connection.cursor()
> -            self._execute = lambda a: self._cursor.execute(a[:-1])
> +            self._execute = lambda a, b=(): self._cursor.execute(a[:-1],b)
>          elif is_jdbc and self._uri[:9] == 'sqlite://':
>              self._dbname='sqlite'
>              if uri[9] != '/':
>
> Result:
>
> (Pdb) print db2db.executesql("call webxdsl.abonsearch (123, 'port_id',
> '41110', '1', ?, ?);",(1,2))
> <rows follow>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to