lovewebdev
> @clientusername VARCHAR OUTPUT,
> @clientpwd VARCHAR OUTPUT,
Before you throw CF into the mix, did you first verify the
stored procedure actually works as expected in sql server? I
noticed the varchar variables are missing a size declaration. Add a
size that is large enough to hold the corresponding values from the
client_info table. Then try running the stored procedure directly
in sql server:
DECLARE @clientusername varchar(50)
DECLARE @clientpwd varchar(50)
EXEC getclientstuff 1, @clientusername OUT, @clientpwd OUT
--- display the results
SELECT @clientusername, @clientpwd
> <cfstoredproc procedure="getclientstuff"
datasource=etc...>
> ...
> <cfprocresult name="clientinfo">
> </cfstoredproc>
I do not know about best practices, but personally I tend to
use either "output" variables OR return a resultset (not both).
When I have a lot of information to return, I use a resultset. For
simple or single values like a code, or id value I typically use
"output" variables.