Hello,
I have a stored procedure that is selecting records within a list of
values. The stored proc is (abbreviated)
CREATE PROCEDURE getSearchResults
@time varchar(150 = NULL
AS
SELECT *
FROM table
Where time in (@time)
GO
Here's my coldfusion code:
<cfset application.morning = "8:00 AM,9:00 AM,10:00 AM,11:00 AM">
<cfstoredproc procedure="GetSearchResults" datasource="#request.mainDSN#">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR"
value="#trim(listqualify(application.morning,"'"))#" null="No">
<cfprocresult name="getSearchResults">
</CFSTOREDPROC>
The problem is that the stored procedure doesn't return results, and I
believe its because coldfusion doesn't pass the list of values correctly. I
added code in the SP to insert whatever value it was passed into a temporary
table, and the values looked good, ie they were 'time1', 'time2', etc.
Hard-coding the times works also, of course. But I cannot get any results if
I pass the list in.
Thanks in advance,
Ian
Portent Interactive
Using Process, Design and Content to create great web sites since 1995
Consulting, design, development, measurement
http://www.portentinteractive.com
______________________________________________________________________
Get Your Own 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=coldfusionb
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