I have this Stored procedure on my sql server :
[InsertRecord] @param1 varchar(10), @Param2 varchar(50),@Param3 varchar(10)=NULL,
@Param4 datetime = NULL AS BEGIN
When I update it with the following code :
connenction = pymssql.connect (host=host1,user=user1,password=password1,database=database1)
curser = connection.cursor()
my_query="exec InsertRecord '%s','%s','%s','%s'" %(var1,var2,var3,var4)
print my_query
cur.execute(my_query)
I didn't get any sentax error and the stored procedure not updated on my DB
but when i run the my_query string from the sql managment studio the query ran as it should be . could someone provide what could be the problem with this code and how should i run this stored procedure with pymssql.