Mar-21-2018, 03:26 PM
I am trying to execute a stored proc using the following i keep getting a error?
am I using the correct syntax to call the sql stored proc
import PYODBC
db = pyodbc.connect("Driver={SQL Server Native Client 11.0};"
"Server=server_name;"
"Database=table_name;"
"Trusted_connection=yes;")
cur= db.cursor()
sql = """ exec databasename.dbo.sp_mystoredprc"""
cur.execute(sql)
am I using the correct syntax to call the sql stored proc
import PYODBC
db = pyodbc.connect("Driver={SQL Server Native Client 11.0};"
"Server=server_name;"
"Database=table_name;"
"Trusted_connection=yes;")
cur= db.cursor()
sql = """ exec databasename.dbo.sp_mystoredprc"""
cur.execute(sql)