Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_cursor_list

  No additional text.


Syntax
-- Creation of sp_cursor_list

create procedure sys.sp_cursor_list
(
   @cursor_return CURSOR VARYING OUTPUT,
   @cursor_scope int
)
AS

if (@cursor_scope < 1) OR (@cursor_scope > 3)
	begin
		/* Raise an error: ?The value of parameter  is invalid? */
		raiserror ( 16902, 1, 1,N'sys.sp_cursor_list', N'@cursor_scope')
		return (1)
	end

if ( @cursor_scope  < 3)
begin
	set @cursor_return =  CURSOR LOCAL SCROLL DYNAMIC FOR
			    	SELECT reference_name, cursor_name, cursor_scope,
					status, model, concurrency, scrollable,
					open_status, cursor_rows, fetch_status,
					column_count, row_count, last_operation,
					cursor_handle
				FROM sys.syscursorrefs scr, sys.syscursors sc
				WHERE 	scr.cursor_scope = @cursor_scope AND
					scr.cursor_handl = sc.cursor_handle
				FOR READ ONLY
end
else
begin
	set @cursor_return =  CURSOR LOCAL SCROLL DYNAMIC FOR
			    	SELECT reference_name, cursor_name, cursor_scope,
					status, model, concurrency, scrollable,
					open_status, cursor_rows, fetch_status,
					column_count, row_count, last_operation,
					cursor_handle
				FROM sys.syscursorrefs scr, sys.syscursors sc
				WHERE scr.cursor_handl = sc.cursor_handle
				FOR READ ONLY
end
open @cursor_return

 
Last revision 2008RTM
News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash