1

I have mysql procedure called from coldfusion page as below. For some reason the procedure executes with cfquery, but not using cfstoredproc. I get the infamous

noAccessToProcedureBodies error

I do not know what I am doing wrong. Any pointers would be appreciated.

SQL:

  CREATE PROCEDURE temp1(in name_id varchar(50) )
  BEGIN
    select col1, col2, col3,  if(col1 <= col3,'fail', 'pass') as ind, 
    count(distinct col2) from table1 group by col2
  END;

ColdFusion:

<cfstoredproc procedure = "temp1" datasource = "test">
    <cfprocparam cfsqltype="cf_sql_varchar" value="gate"> 
    <cfprocresult name="searchResults">
</cfstoredproc> 

<cfdump var="#searchResults#" label="Search Results">
Leigh
  • 28,765
  • 10
  • 55
  • 103
jpp
  • 43
  • 3
  • I suspect that the database connector doesn't support stored procedures. what's the error that you get? do you see anything in the jrun logs? – Stephen Moretti Jun 14 '11 at 19:07
  • 3
    It is not clear what is happening. Are you getting an error or just different results? If it is an error, please post the full message. Otherwise, post your cfquery too. – Leigh Jun 14 '11 at 19:09
  • i get the infamous noAccessToProcedureBodies error – jpp Jun 15 '11 at 14:51
  • Might have a look at the suggestions in this thread http://stackoverflow.com/questions/986628/mysql-java-cant-execute-stored-procedure – Leigh Jun 15 '11 at 15:39

0 Answers0