Your values are probably being passed AOK into a SQL Server SP....can you
post your corresponding SP code?


   _____  

From: Shahzad.Butt [mailto:[EMAIL PROTECTED]
Sent: 27 January 2004 13:50
To: CF-Talk
Subject: RE: Passing List into Stored Proc

Just a thought. Try adding the following line at the start of your SP

SET QUOTED_IDENTIFIER OFF

Also when you run the SP open up a trace in SQL Server Profiler and
check exactly what query has been passed to SQL Server. Copy that query
and send...

Shaz

  _____  

From: John mccosker [mailto:[EMAIL PROTECTED]
Sent: 27 January 2004 11:56
To: CF-Talk
Subject: Passing List into Stored Proc

Hi,

I have wrote a stored proc that will delete items in a table by do
a subquery on a list passed into it.

If I test it in Query Analyzer it runs effectively,

DELETE
FROM DBO.a
WHERE         DBO.a.FOLDERNAME IN ('jim','ben','tom')
AND DBO.a.CUSTOMERID = 1

but when I call through cf passing in the list it does not,

cf
----
<CFSTOREDPROC PROCEDURE="p_test"
DATASOURCE="#request.d#"
USERNAME="#request.u#"
PASSWORD="#request.p#">

<CFPROCPARAM DBVARNAME="@CUSTOMERID"
VALUE="#ListGetAt(cookie.c_userSession,1,';')#"
TYPE="IN"
CFSQLTYPE="CF_SQL_INTEGER">
<CFPROCPARAM DBVARNAME="@FOLDERLIST"
VALUE="#attributes.delete_list#"
TYPE="IN"
CFSQLTYPE="CF_SQL_VARCHAR">

</CFSTOREDPROC>

proc code
---------

CREATE PROCEDURE p_test

(@CUSTOMERID INT,@FOLDERLIST VARCHAR(2000))

AS

DELETE
FROM DBO.a
WHERE         DBO.a.FOLDERNAME IN (@FOLDERLIST)
AND DBO.a.CUSTOMERID = @CUSTOMERID

running ms sql 7.0 and MX 6.1

Thanks for any help.
  _____
   _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to