Gunjan, You are not using a cursor in the way it was intended. You can achieve what you want here by grouping I believe.
A cursor is a record based processing type it is not designed to retrieve records over and over again to display. -----Original Message----- From: Gunjan Varshney [mailto:[EMAIL PROTECTED] Sent: 23 August 2005 12:21 To: CF-Talk Subject: Calling cursor in MS SQL sever from coldfusion Hello, I am quite new to coldfusion. I am facing problem in retrieving resultsets returend by the cursor. Since I do not know number of resultsets returned, I am not able to define cfprocresult tags in cfstoredproc. cfquery returns only the first resultset. Please I need help. I have defined my cursor in a stored proc and looks like : ----------- CREATE PROCEDURE [dbo].[GroupView] @dgid int AS declare cursor1 Cursor for select distinct(main_number) from installed_base where [EMAIL PROTECTED] declare @mno varchar(10) open cursor1 fetch next from cursor1 into @mno while(@@fetch_status <> -1) BEGIN select bi_main_number, bi_sub_number from installed_base where [EMAIL PROTECTED] and [EMAIL PROTECTED] fetch next from cursor1 into @mno END close cursor1 deallocate cursor1 GO Please help..... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216018 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

