BI Documenter

Welcome to BI Documenter Sign in | Join | Help
in Search

Garbled documentation of User Defined Functions and their parameters

Last post 08-27-2008, 8:23 PM by rbrookes. 4 replies.
Sort Posts: Previous Next
  •  03-12-2008, 10:12 AM 209

    Garbled documentation of User Defined Functions and their parameters

    I'm documenting user-defined functions and their parameters in a database, and what Bi Documenter displays for their documentation (both for the functions as well as the parameters) is a garbled mess of non-standard characters.  The documentation is of course in English.  When I use fn_listextendedproperty to retrieve the documentation on the respective functions and parameters, the MS_Description extended property values are returned correctly.  Nevertheless, each new snapshot and compilation of HTML files (even Compiled HTML Help files) displays the garbled mess.

     The SQL for one such function is as follows:

    CREATE FUNCTION SomeFunction (

    @aParameter AS INT

    ) RETURNS VARCHAR(1000) AS BEGIN

    RETURN 'something'

    END

    GO

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

    -- DOCUMENTATION

    EXEC sp_addextendedproperty

    'MS_Description', 'Calculates something from nothing.'

    , 'SCHEMA', 'dbo'

    , 'FUNCTION', 'SomeFunction'

    , NULL, NULL

    EXEC sp_addextendedproperty

    'MS_Description', 'Provides nothing to function.'

    , 'SCHEMA', 'dbo'

    , 'FUNCTION', 'SomeFunction'

    , 'PARAMETER', '@aParameter'

    --end DOCUMENTATION

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

    SELECT dbo.SomeFunction( 3 )

    SELECT * FROM ::fn_listextendedproperty('MS_Description', 'SCHEMA', 'dbo', 'FUNCTION', 'SomeFunction', NULL, NULL)

    SELECT * FROM ::fn_listextendedproperty('MS_Description', 'SCHEMA', 'dbo', 'FUNCTION', 'SomeFunction', 'PARAMETER', NULL)

    When running this SQL, you'll notice that the function is made, documented, run successfully, and the documentation verified to exist and be well-formatted.  However, when I create either an HTML output or CHM output of all database objects (including user defined functions), or just User Defined Functions, or just tables and User Defined Functions and a few other things--in any case--the documentation for SomeFunction ends up being "慃捬汵瑡獥猠浯瑥楨杮映潲潮桴湩⹧" and the documentation for @aParameter, "牐癯摩獥渠瑯楨杮琠畦据楴湯."  My database is a SQL Server 2005 Express Edition, and my operating system is XP Professional Service Pack 2.  Also, I noticed that the documentation on all of the database's User Defined Functions and their respective parameters is similarly garbled (and they are all garbled differently, so it seems to be some kind of encoding issue when Bi Documenter processes the MS_Description extended properties of FUNCTIONs in particular)--note that I haven't had issues like this with tables, columns, stored procedures, or stored procedure parameters.  And finally, I'm using BI Documenter Database Edition, Product version: 2.0.13.0; File version: 2.0.13.0; Language: Language Neutral.  Hope this helps track down what's going on here.  I'll be happy to clarify anything you'd like fyi.

     -Olen Davis

  •  03-13-2008, 4:34 PM 211 in reply to 209

    Re: Garbled documentation of User Defined Functions and their parameters

    I see your issue. We are using DMO to pull the extended propery value and are being returned garbage. Therefore you are getting garbage. I will need to do some more investigation.

    I'll let you know.

    Richard

    BI Documenter

     

  •  03-19-2008, 5:46 AM 213 in reply to 211

    Re: Garbled documentation of User Defined Functions and their parameters

    Hey, good to hear!  Our timeline still has plenty of flex; we're not yet required to have all our functions documented, so I'm looking forward to your eventual reply with comfortably less than desperate anticipation.

    -Olen Davis

  •  08-26-2008, 3:35 AM 252 in reply to 211

    Re: Garbled documentation of User Defined Functions and their parameters

    So what's the word, Richard?
  •  08-27-2008, 8:23 PM 253 in reply to 252

    Re: Garbled documentation of User Defined Functions and their parameters

    As mentioned earlier, the issue is with DMO giving us garbage data.There is no quick fix readily available.

    We are working on a new method of extracting the data using the new SQL 2008 version of SMO. This will be part of the new release which is looking like being ready in October.

    Richard

    BI Documenter

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems