DJANGO STORED PROCEDURES ERROR-> cursor object has not attribute’callproc’”

Viewed 24

I’m using mssql driver to make a connection with a sql server database in django, the thing is that in my views.py I’ve already import ‘from django.db import connection’ to open a cursor, then I use the next script to register a new user (django—>sql server):

cursor = connection.cursor() cursor.callproc(‘[dbo.SP_UC_CREATE]’,[name, lastname,password,email])

This written inside a views.py called: “def createUser(name,lastname,password,email):

The error message in the explorer is ‘pyodbc.Cursor’ object has no attribute ‘callproc’

*in my function request I’m just calling the function ‘createUser()’ giving it the parameters

0 Answers
Related