我在mssql spGetRowRackInfo中有一个存储过程, 我正在我的Django应用程序中调用该过程(使用pyodbc)
URL模式:
urlpatterns = [
path('ReportRacks/',views.ReportRacks,name="ReportRacks"),]
代码:
id = request.GET["ID"]
Type = request.GET["Type"]
cursor = connection.cursor()
cursor.execute("{call dbo.spGetRowRackInfo(?,?)}",[id,Type])
遇到错误:
ERR sql = sql % tuple('?' * len(params))
ERR TypeError: not all arguments converted during string formatting
我该如何解决?