Skip to main content
lovewebdev
Inspiring
January 27, 2009
Question

Stored Procedures CF workflow? newbie question

  • January 27, 2009
  • 3 replies
  • 1207 views
I'm trying to move from queries to Stored Procedured but having a tough time understanding the flow of stored procedures. I attached code where all I want to do is filter a table with an id from a CF url parameter (userid) and then retrieve other column values and pass it to the CF page.

I'm not getting the correct value from the db upon cfoutput. it keeps on displaying the value 1 on the page no matter which db column I try to output from the stored procedure.
This topic has been closed for replies.

3 replies

lovewebdev
Inspiring
January 27, 2009
Ok It worked. When I added the correct (50) to the VARCHAR variables it worked. I wasn't allowed to use DECLARE with OUTPUT so that wasn't it.

Also I can't find the point to <cfprocresult name="clientinfo"> tag like you said. I thought that created a query out of the results. How is this accessible in a CF page?

Adobe Live docs says about the tag "Associates a query object with a result set returned by a stored procedure"
http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-b17.htm

But whenever I use <cfoutput query="clientstuff">#column#</cfoutput> I get an error that clientstuff is undefined.

Thanks!
Inspiring
January 27, 2009
If your stored procedure returns a resultset. The one in your first post does not:

Use <cfoutput query="clientinfo"> ... </cfoutput>. The query results are refered to by the name of the cfprocresult not the cfstoredproc.

You should use <cfoutput>#clientusername# #clientpwd#</cfoutput>
Inspiring
January 27, 2009
The 2nd error is understandable because you can only output a query if you have a cold fusion query object, and you don't.

What happens if you cfdump clientinfo?
Inspiring
January 27, 2009
What happens when you run it?
lovewebdev
Inspiring
January 27, 2009
lol good question.
I'm simply using <cfoutput>#clientusername#</cfoutput> to display one of the OUT variables on the page and I just keep getting a display of the number 1 as the result. no matter which variable I try to access. It should be text coming from the column clientusername.