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 - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188403 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

