Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I believe I found a procedure bug with a single parameter [PYFB79] #94

Closed
firebird-automations opened this issue Jun 20, 2019 · 3 comments

Comments

@firebird-automations
Copy link

Submitted by: Adriano de Souza (azuos777)

work with a firebird 3.0 database and use many procedures with only one input parameter.

When I try to execute a procedure with two paramenters

cursor.callproc ("myproc", (param1, param2))
outputParams = cursor.fetchall ()
firebird.commit ()
print (outputParams)

Everything works fine.

But when trying to execute a procedure with only one parameter

cursor.callproc ("mysingleproc", (param1))
outputParams = cursor.fetchall ()
firebird.commit ()
print (outputParams)

I get a return error.
callproc paremeters must be List or Tuple

@firebird-automations
Copy link
Author

Commented by: @pcisar

The parameter list must be a list or tuple. If you want to pass only single parameter as a tuple, you have to add a colon, i.e. (param,) otherwise the Python will handle it as expression and not as tuple constructor. Or use a list, as [para,1] will make a list with single item.

@firebird-automations
Copy link
Author

Modified by: @pcisar

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants