Hi,
Is there a way to execute a statement, passing in an array for the bind variables? If I use
sth.execute(array[0],array[1],array[2])
Everything works fine, but if I just use
sth.execute(array)
I get a ‘not all variables bound’ error. Am I missing something?
Marty
To make an array expand into across the parameter list for a method, use
the * operator.
sth.execute(*array)
···
On Wed, 19 Feb 2003 07:31:36 +0900, Martin Bonner wrote:
Hi,
Is there a way to execute a statement, passing in an array for the
bind variables? If I use
sth.execute(array[0],array[1],array[2])
Everything works fine, but if I just use
sth.execute(array)
I get a ‘not all variables bound’ error. Am I missing something?
Marty