Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_ddopen

  No additional text.


Syntax

create procedure sys.sp_ddopen;1
(
    @handle         int output,
    @procname       sysname,
    @scrollopt      int output,
    @ccopt          int output,
    @rows           int output,
    @p1             nvarchar(774) = null,
    @p2             nvarchar(774) = null,
    @p3             nvarchar(774) = null,
    @p4             nvarchar(774) = null,
    @p5             nvarchar(774) = null,
    @p6             nvarchar(774) = null,
    @p7             int = null,
    @NameScope      int = 0,
    @ODBCVer        int = 2,
    @fUsePattern    bit = 1 -- To allow users to explicitly disable all pattern matching.
)
as
    set nocount on
    declare @ret int

    
    -- Yukon clients are always going to send [sys].sp_name
    
    if @procname = 'sp_column_privileges' or
       @procname = '[sys].sp_column_privileges'
    begin
        exec @ret = sys.sp_ddopen;2 @handle output,
                            @scrollopt output,
                            @ccopt output,
                            @rows output,
                            @p1,
                            @p2,
                            @p3,
                            @p4
    end
    else if @procname = '[sys].sp_columns_100' or @procname = '[sys].sp_columns_90' or @procname = '[sys].sp_columns' or
            @procname = '[sys].sp_columns_ex_100' or @procname = '[sys].sp_columns_ex_90' or @procname = '[sys].sp_columns_ex' or
            @procname = 'sp_columns_90' or @procname = 'sp_columns' or
            @procname = 'sp_columns_ex_90' or @procname = 'sp_columns_ex' or
            @procname = '[sys].sp_table_type_columns_100' or
            @procname = 'sp_table_type_columns_100'
    begin
        exec @ret = sys.sp_ddopen;3 @handle output,
                            @procname,
                            @scrollopt output,
                            @ccopt output,
                            @rows output,
                            @p1,
                            @p2,
                            @p3,
                            @p4,
                            @p5,
                            @NameScope,
                            @ODBCVer,
                            @fUsePattern
    end
    else if @procname = '[sys].sp_datatype_info_100' or @procname = '[sys].sp_datatype_info_90' or @procname = '[sys].sp_datatype_info' or
            @procname = 'sp_datatype_info_90' or @procname = 'sp_datatype_info'
    begin
        exec @ret = sys.sp_ddopen;4 @handle output,
                            @procname,
                            @scrollopt output,
                            @ccopt output,
                            @rows output,
                            @p7,
                            @ODBCVer
    end
    else if @procname = 'sp_fkeys' or
            @procname = '[sys].sp_fkeys'
    begin
        exec @ret = sys.sp_ddopen;5 @handle output,
                            @scrollopt output,
                            @ccopt output,
                            @rows output,
                            @p1,
                            @p2,
                            @p3,
                            @p4,
                            @p5,
                            @p6
    end
    else if @procname = 'sp_pkeys' or
            @procname = '[sys].sp_pkeys'
    begin
        exec @ret = sys.sp_ddopen;6 @handle output,
                            @scrollopt output,
                            @ccopt output,
                            @rows output,
                            @p1,
                            @p2,
                            @p3
    end
    else if @procname = '[sys].sp_special_columns_100' or @procname = '[sys].sp_special_columns_90' or @procname = '[sys].sp_special_columns' or
            @procname = 'sp_special_columns_90' or @procname = 'sp_special_columns'
    begin
        exec @ret = sys.sp_ddopen;7 @handle output,
              @procname,
                            @scrollopt output,
                            @ccopt output,
                            @rows output,
                            @p1,
                            @p2,
                            @p3,
                            @p4,
                            @p5,
                            @p6,
                            @ODBCVer
    end
    else if @procname = '[sys].sp_sproc_columns_100' or @procname = '[sys].sp_sproc_columns_90' or @procname = '[sys].sp_sproc_columns' or
            @procname = 'sp_sproc_columns_90' or @procname = 'sp_sproc_columns'
    begin
        exec @ret = sys.sp_ddopen;8 @handle output,
                            @procname,
                            @scrollopt output,
                            @ccopt output,
                            @rows output,
                            @p1,
                            @p2,
                            @p3,
                            @p4,
                            @ODBCVer,
                            @fUsePattern
    end
    else if @procname = '[sys].sp_statistics_100' or @procname = '[sys].sp_statistics' or
            @procname = 'sp_statistics'
    begin
        exec @ret = sys.sp_ddopen;9 @handle output,
                            @scrollopt output,
                            @ccopt output,
                            @rows output,
                            @p1,
                            @p2,
                            @p3,
                            @p4,
                            @p5,
                            @p6
    end
    else if @procname = 'sp_stored_procedures' or
            @procname = '[sys].sp_stored_procedures'
    begin
        exec @ret = sys.sp_ddopen;10 @handle output,
                             @scrollopt output,
                             @ccopt output,
                             @rows output,
                             @p1,
                             @p2,
                             @p3,
                             @fUsePattern
    end
    else if @procname = 'sp_table_privileges' or
            @procname = '[sys].sp_table_privileges'
    begin
        exec @ret = sys.sp_ddopen;11 @handle output,
                             @scrollopt output,
                             @ccopt output,
                             @rows output,
                             @p1,
                             @p2,
                             @p3,
                             @fUsePattern
    end
    else if @procname = 'sp_tables' or @procname = 'sp_tables_ex' or
            @procname = '[sys].sp_tables' or @procname = '[sys].sp_tables_ex'
    begin
        exec @ret = sys.sp_ddopen;12 @handle output,
                            @procname,
                            @scrollopt output,
                            @ccopt output,
                            @rows output,
                            @p1,
                            @p2,
                            @p3,
                            @p4,
                            @p5,
                            @fUsePattern
    end
    else if @procname = 'sp_tableswc' or
            @procname = '[sys].sp_tableswc'
    begin
        exec @ret = sys.sp_ddopen;13 @handle output,
                             @procname,
                             @scrollopt output,
                             @ccopt output,
                             @rows output,
                             @p1,
                             @p2,
                             @p3,
                             @p4,
                             @fUsePattern
    end
    else
        print 'Unknown sys.sp_ddopen procedure'
    select @ret = isnull(@ret,0)
    return isnull(@ret,0)

 
Last revision 2008RTM
See also

  spt_all_procedures (View)
spt_procedures_user (View)
sp_stored_procedures (Procedure)
       



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