[AccessD] Display records from SQL Server SP with cursor output param

Sad Der accessd666 at yahoo.com
Mon Aug 1 03:26:04 CDT 2005


Hi group,

I've got a Stored Procedure in SQL Server. It has 1 IN
and 1 OUTPUT param.
The SP is used to search a database for values and
return the data using a cursor accordingly.

If I run the code below (SQL Server) it returns
exactly the records I need.

My question:
How can I call this SP from within MS-Access 2000 and
display the cursor info?

DECLARE @MyCursor CURSOR
EXEC search_cursor 
	@Remark = '%Project%' ,
	@search_cursor = @MyCursor OUTPUT
WHILE (@@FETCH_STATUS = 0)
BEGIN
   FETCH NEXT FROM @MyCursor
END
CLOSE @MyCursor
DEALLOCATE @MyCursor
GO

Thnx

SD

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the AccessD mailing list