You need to issue the SET NOCOUNT ON statement before running your select
statement.  (It's also a good idea to put SET NOCOUNT OFF at the end as
well).

You can do this in your SP, like:

CREATE PROC MyProc
AS
SET NOCOUNT ON
SELECT .....
......
SET NOCOUNT OFF

Or you can do it inside the CFQUERY tag like:

<CFQUERY ....>
SET NOCOUNT ON
Exec MyProc
SET NOCOUNT OFF
</CFQUERY>

Bob

-----Original Message-----
From: Daryl Walsh [mailto:[EMAIL PROTECTED]]
Sent: April 9, 2001 4:01 PM
To: Fusebox
Subject: ODBC v OLE stored proc


running a stored procedure on sql server 2k.
sp executes fine from query analyzer and
returns a result.
when i try to call the sp from cf using
either cfquery or cfstoredproc
i get a 'query does not exist error' on the output.
that was/is on an OLEDB connection.

added an odbc datasource and the problem is gone,
i.e., the query is found and the results outputted.

what do i need to do to get the sp to
work under OLE as it does under ODBC?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to