Error executing system.db.execSProcCall()

import datetime
def AF_StepPower(Heat_No):
call = system.db.createSProcCall(“sp_calcstepwisepower”)
call.registerInParam(“ps_heatnumber”, system.db.VARCHAR, Heat_No)
system.db.execSProcCall(call)

I have this script in my ignition. I want to call store procedure with one string type of parameter. Store procedure is in MySql and Ignition version is 7.9.10
Script is giving following error :at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.error(AbstractDBUtilities.java:362)

at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.execSProcCall(AbstractDBUtilities.java:496)

at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

java.lang.Exception: java.lang.Exception: Error executing system.db.execSProcCall()

When I tried the same with console script window its executing properly but on tab event change it is not working .

what should be done in such case ?

have you tried adding the DB? something like

call = system.db.createSProcCall(“sp_calcstepwisepower”,"DB_NAME")