以下のようなPythonコードでストアドプロシージャを使いたいです。
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(ストアドプロシージャ)を使用して関数パラメータをDBに送信するにはどうすればよいですか
cursor.execute("exec InserttoDB studentID,name,surname,birth,address,telephone")