Yep.

<cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" dbvarname="Order_ID"
value="#Arguments.Order_ID#" null="no">

This binds to the Order_ID inside the SP which is defined (inside) as
@Order_ID. The reason for the @ inside is to show it's a SQL variable.

> Eh? what so you remove it altogether in for dbvarname?
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 21 December 2004 17:36
> To: CF-Talk
> Subject: RE: CFStoredProc bug?
> 
> It's one that throws everyone due to a bad example somewhere in the past.
> Actually, the @ should never be used in either variable (outgoing data
> from
> the SP) or dbvarname (binding to a sp var name). I had to remove all of
> the
> @ from dbvarnames in the mothernature code. Ug.
> 
> > Oh yeah....sorry my bad = you only need it with @ if you are using
> > @dbvarname.
> >
> > Thanks MD, was a little out on that one ;-)
> >
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: 21 December 2004 17:23
> > To: CF-Talk
> > Subject: RE: CFStoredProc bug?
> >
> > If you mean in the CFPROCPARAM tag, no you should not. @cSearch is not
> the
> > variable. @cSearch is the internal holder for the variable being passed
> in
> > which is cSearch.
> >
> > > You should change your cSearch to @cSearch
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: C. Hatton Humphrey [mailto:[EMAIL PROTECTED]
> > > Sent: 21 December 2004 17:02
> > > To: CF-Talk
> > > Subject: CFStoredProc bug?
> > >
> > > Okay, I just ran across this and I'm not sure if it's something that
> > > has been looked into before but it does give me reason for concern.
> > >
> > > I have a stored procedure, up_get_status, that takes two parameters,
> > > @nStatus_id and @cSearch.  It is basically
> > >
> > > SELECT cLabel
> > > FROM Status
> > > WHERE nStatus_ID = CASE WHEN @nStatus_id = 0 THEN nStatus_id ELSE
> > > @nStatus_id END
> > > AND cLabel = CASE WHEN @cSearch IS NULL THEN cLabel ELSE @cSearch END
> > >
> > > I have the parameters set with defaults in the stored proceudure.  In
> > > my code I have the following call (taking it out of the cffunction
> > > since I'm doing more than just calling this one table):
> > >
> > > <cfstoredproc datasource="#dsn#" procedure="up_get_status">
> > > <cfprocparam cfsqltype="CF_SQL_VARCHAR" variable="cSearch"
> > > value="#f_search#">
> > > </cfstoredproc>
> > >
> > > When I run this I get a SQL error "Error converting data type varchar
> to
> > > int".
> > >
> > > This is the same result I get when I try to run 'up_get_status
> > > 'Pending'' as opposed to 'up_get_status @cSearch='Pending' '
> > >
> > > Is this a new thing??
> > >
> > > Hatton
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188409
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to