I've found the same thing and was also surprised at first.  Like you, I
thought that the order shouldn't matter when using named parameters.

Jim


----- Original Message -----
From: "Michael Haggerty" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, December 31, 2001 2:41 PM
Subject: MSSQL Stored Proc and Named Notation


> Hi, I am using MS SQL Server 7.0 and CF 5.0 and I am having trouble with a
> call to a stored procedure. The procedure is detailed below, and when I
try
> to call it using the following code, it blows up:
>
> <cfstoredproc datasource="#application.transact_database#"
> procedure="qry_test" debug>
> <cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" dbvarname="@user_id"
> value=form.user_id NULL="No">
> <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@username"
> value="some.username" NULL="No">
> <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@password"
> value=some.password NULL="No">
> <cfprocresult name="qry_test" resultset="1">
> </cfstoredproc>
>
> When I move the @user_id procparam to the end of the parameters list,
> everything works fine.
>
> My question is, I thought that by specifying the name of the parameter you
> are passing in via the dbvarname property, you were not limited to
> positional notation. Why does the order of my variables affect my call to
> the stored procedure?
>
> Thanks,
> Mike
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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