Populate sql table field descriptions programatically

  • I am trying to update my sql table field descriptions programatically, but I am getting an error.

    ------------------------------

    use NCOS

    GO

    EXEC sp_updateextendedproperty

    @name = N'MS_Description', @value = 'Your description',

    @level0type = N'Schema', @level0name = 'NCOS',

    @level1type = N'Table', @level1name = 'NCOS_Data',

    @level2type = N'Column', @level2name = 'NC_Prospect_Name';

    Error:

    Server: Msg 15600, Level 15, State 1, Procedure sp_updateextendedproperty, Line 42

    An invalid parameter or option was specified for procedure 'sp_updateextendedproperty'.

  • I cannot test this at the moment, but I think..

    You are specifying the database name NCOS as the Schema name. It knows the database name already, so just replace the 'NCOS' with 'dbo' or whatever is appropriate for the schema name.

    Mike John

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply