As an aside for info purposes, the variable attribute in cfprocparam is for info sent from the SP to CF. To bind a passed value to a SP variable, you use dbvarname.
> It's normal and not buggy. > > CFStoredproc passes values in the order that they are declared. I > believe the "variable" attribute to the cfprocparam tag tells CF what > the variable name will be (for OUT and IN/OUT variables) > > Stored procedures can be called by name > > sp_proc @two='xyz', @one='abc' > > Or by order > > sp_proc 'abc', 'xyz' > > -nathan strutz > > > > C. Hatton Humphrey wrote: > > 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 Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188405 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

