I'm working on my first SQLServer SPROC app and I'm trying to create the
equivalent of an Oracle referential cursor in my sproc but am running up
against this error:
ODBC Error Code = 22005 (Error in assignment) [Microsoft][ODBC SQL Server
Driver][SQL Server]Operand type clash: char is incompatible with cursor
In Oracle I simply create a pointer to my ref cursor package and output the
results. I have no probs getting it to run, error-free but now I am stumped.
Here's my sproc -- perhaps someone has some insight:
CREATE PROCEDURE dbo.testProc
@curr int,
@undef cursor varying output
as
declare @currid int,
@currtitle varchar(2000)
declare undef cursor
for select a.ID, a.TITLE
from vw_CONTENT_status a, tbl_fpContent b
where a.status like 'Live' and b.id=a.id and a.id=@curr
order by b.pos
OPEN undef
while @@fetch_status = 0
begin
fetch next from undef into @currid, @currtitle
end
close undef
deallocate undef
GO
I'm accessing this w/ CFSTOREDPROC and resultset but am getting this error. I
can find nothing in the SQL docs about referential cursors.. Any insights
appreciated!
thanks,
-e
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
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