0
아래와 같은 파이썬 코드로 저장 프로 시저를 사용하고 싶습니다.어떻게 파이썬 코드의 매개 변수와 함께 저장 프로 시저를 사용할 수 있습니까?
import pyodbc
conn = pyodbc.connect('Trusted_Connection=yes', driver = '{SQL Server}',
server = 'ZAMAN\SQLEXPRESS', database = 'foy3')
def InsertUser(studentID,name,surname,birth,address,telephone):
cursor = conn.cursor()
cursor.execute("exec InserttoDB studentID,name,surname,birth,address,telephone")
rows = cursor.fetchall()
아래 코드에 일부 문제가 있습니다. 내가 InserttoDB (저장 프로 시저)
cursor.execute("exec InserttoDB studentID,name,surname,birth,address,telephone")