Python call sql-server stored procedure with table valued parameter

On the basis of the comments to my question i’ve managed to get the stored procedure running with table valued parameters (and get the return values from the SP) The final script is as follows: import pandas as pd import pytds from pytds import login import sqlalchemy as sa from sqlalchemy import create_engine import sqlalchemy_pytds … Read more

Python MySQL Connector database query with %s fails

Change your funcursor.execute(query, uName) call to: funcursor.execute(query, (uName, )) The second argument in execute takes a list/tuple of strings, not a string. The above call creates the tuple before passing in the string to execute, so no error is thrown. The reason why execute takes a list/tuple of strings is because it does not know … Read more