I’m new to Lucee and I’m trying to convert an existing ACF project. Is it possible to call a stored procedure from script? I can’t find any examples of scripting in Lucee?
Example Code:
public query function someFunction(host)
{
LOCAL.sp = new storedproc();
LOCAL.sp.setDatasource(THIS.DSN);
LOCAL.sp.setProcedure(“somesqlproc”);
LOCAL.sp.addParam(cfsqltype=“CF_SQL_VARCHAR”, type=“in”,value=ARGUMENTS.host);
LOCAL.sp.addProcResult(name=“rs”,resultset=1);
LOCAL.result = LOCAL.sp.execute();
return LOCAL.result.getProcResultSets().rs;
}
The error I am getting is:
Messages: invalid component definition, can’t find component [storedproc]
Thanks