I think you need 
DBVARNAME="Orderby" 
instead of 
DBVARNAME="@Orderby"

This might be helpful:
http://www.defusion.com/articles/index.cfm?ArticleID=56

> -----Original Message-----
> From: Jared Stark [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 04, 2001 5:54 PM
> To: CF-Talk
> Subject: Problem with Stored Procedure
> 
> 
> -- Here is code snippet for my stored procedure:
> 
> CREATE PROCEDURE spGetManagers
>  @OrderBy nvarchar(20)   = 'LAST',
>  @OrderType nvarchar(10)  = 'ASC',
>  @Id  int   = -1,
>  @ErrorStatus int  OUTPUT,
>  @ErrorMsg nvarchar(255) OUTPUT
> AS
> ...
> 
> -- Here is CF Code calling the stored procedure:
> 
> <cfstoredproc datasource="#request.dsn#" username="#request.user#"
> password="#request.pass#" procedure="spGetManagers">
> 
>  <cfprocparam dbvarname="@Orderby" type="IN" value="LAST"
> cfsqltype="CF_SQL_VARCHAR">
>  <cfprocparam dbvarname="@ErrorStatus" type="OUT" 
> variable="ErrorStatus"
> cfsqltype="CF_SQL_INTEGER">
>  <cfprocparam dbvarname="@ErrorMsg" type="OUT" variable="ErrorMsg"
> cfsqltype="CF_SQL_VARCHAR">
>  <cfprocresult name="manager" resultset="1">
> 
> </cfstoredproc>
> 
> You'll notice that I'm not providing parameters for 
> @OrderType, nor @Id as
> they have default values defined in the sp.
> 
> -- Here is the error message I am getting:
> 
> [Microsoft][ODBC SQL Server Driver][SQL Server]Formal 
> parameter '@OrderType'
> was defined as OUTPUT but the actual parameter not declared OUTPUT.
> 
> It would appear that it is trying to map my second 
> <cfprocparam> to the
> @OrderType parameter, rather than using Named Notation and 
> mapping it to
> @ErrorStatus.  My understanding is that by using the 
> dbvarname attribute it
> would pass to the correct parameter and I wouldn't need to provide a
> <cfprocparam> tag for ALL parameters.
> 
> 1. Is there something stupid here that I'm missing?
> 2. Has anyone else had this problem?
> 3. Should I call it a day, and go home? (yes)
> 
> Thanks for any help...
> Jared
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to