none
sp_sproc_columns, @RETURN_VALUE non renvoyée => Jdbc spécifications non respectées ? RRS feed

  • Question

  • Bonjour,

    SqlServer 2005 sp2.

    exec sp_sproc_columns  @procedure_qualifier = null, @procedure_owner = '%', @procedure_name = '%', @column_name = '%', @fUsePattern = 1

    ne renvoit pas les @RETURN_VALUE.

    Pour moi il s'agit d'une régression par rapport à SqlServer 2000 et est du à la définition de la sp_sproc_columns. En effet à la fin du code ou a (pour @fUsePattern = 1)

            UNION ALL

            select         -- procedure return value & table valued functions
                PROCEDURE_QUALIFIER         = s_scrvov.PROCEDURE_QUALIFIER,
                PROCEDURE_OWNER             = s_scrvov.PROCEDURE_OWNER,
                PROCEDURE_NAME              = convert(nvarchar(134),
                                                s_scrvov.PROCEDURE_NAME +';'+ ltrim(str(s_scrvov.procedure_number,5))),
                COLUMN_NAME                 = s_scrvov.COLUMN_NAME,
                COLUMN_TYPE                 = s_scrvov.COLUMN_TYPE,
                DATA_TYPE                   = s_scrvov.DATA_TYPE,
                TYPE_NAME                   = s_scrvov.TYPE_NAME,
                "PRECISION"                 = s_scrvov.PRECISION,
                "LENGTH"                    = s_scrvov.LENGTH,
                SCALE                       = s_scrvov.SCALE,
                RADIX                       = s_scrvov.RADIX,
                NULLABLE                    = s_scrvov.NULLABLE,
                REMARKS                     = s_scrvov.REMARKS,
                COLUMN_DEF                  = s_scrvov.COLUMN_DEF,
                SQL_DATA_TYPE               = s_scrvov.SQL_DATA_TYPE,
                SQL_DATETIME_SUB            = s_scrvov.SQL_DATETIME_SUB,
                CHAR_OCTET_LENGTH           = s_scrvov.CHAR_OCTET_LENGTH,
                ORDINAL_POSITION            = s_scrvov.ORDINAL_POSITION,
                IS_NULLABLE                 = s_scrvov.IS_NULLABLE,
                SS_UDT_CATALOG_NAME                  = s_scrvov.SS_UDT_CATALOG_NAME,
                SS_UDT_SCHEMA_NAME                   = s_scrvov.SS_UDT_SCHEMA_NAME,
                SS_UDT_ASSEMBLY_TYPE_NAME            = s_scrvov.SS_UDT_ASSEMBLY_TYPE_NAME,
                SS_XML_SCHEMACOLLECTION_CATALOG_NAME = s_scrvov.SS_XML_SCHEMACOLLECTION_CATALOG_NAME,
                SS_XML_SCHEMACOLLECTION_SCHEMA_NAME  = s_scrvov.SS_XML_SCHEMACOLLECTION_SCHEMA_NAME,
                SS_XML_SCHEMACOLLECTION_NAME         = s_scrvov.SS_XML_SCHEMACOLLECTION_NAME,
                SS_DATA_TYPE                = s_scrvov.SS_DATA_TYPE
            from
                sys.spt_sproc_columns_return_values_odbc_view s_scrvov
            where
                s_scrvov.PROCEDURE_NAME like @procedure_name and
                schema_name(s_scrvov.schema_id) like @procedure_owner and
                (
                    @column_name is null or
                    @column_name = '@RETURN_VALUE' or
                    @column_name = '@TABLE_RETURN_VALUE'
                ) and
                (s_scrvov.procedure_number between @group_num_lower and @group_num_upper)

            order by 1, 2, 3, 18
        end

    Alors que la clause where finale devrait peut être ressembler à :
            where
                s_scrvov.PROCEDURE_NAME like @procedure_name and
                schema_name(s_scrvov.schema_id) like @procedure_owner and
                (
                    @column_name is null or
                    '@RETURN_VALUE' like @column_name or
                    '@TABLE_RETURN_VALUE' like @column_name
       ) and
                (s_scrvov.procedure_number between @group_num_lower and @group_num_upper)

            order by 1, 2, 3, 18
        end

    Ce problème est il identifié chez Microsoft ? Et si oui, il y a t'il un correctif prévu ?
    vendredi 25 janvier 2008 13:50