Click here to Skip to main content
15,881,882 members
Articles / Database Development / SQL Server

SQL XML Documentation

Rate me:
Please Sign up or sign in to vote.
4.59/5 (12 votes)
29 Feb 2008CPOL5 min read 112.2K   1.4K   75  
How to create and compile SQL XML Documentation comments
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="JocysCom.Sql.ScriptsGenerator.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
        </sectionGroup>
    </configSections>
    <userSettings>
        <JocysCom.Sql.ScriptsGenerator.Properties.Settings>
            <setting name="PermissionTextBox" serializeAs="String">
                <value>---------------------------------------------------------------
-- Grant Permission To All Stored Procedures
---------------------------------------------------------------
-- Grant execute permission on procedures to user. 
DECLARE @user sysname SET @user = 'UserName'
DECLARE @item nvarchar(128)
DECLARE items CURSOR LOCAL FAST_FORWARD READ_ONLY FOR
-- Put SQL String here to select item value from table.
SELECT [name] FROM sysobjects WHERE [type] = 'P' and [category] = 0 ORDER BY [name]
OPEN items
FETCH NEXT FROM items INTO @item
WHILE (@@fetch_status &lt;&gt; -1)
BEGIN
	IF (@@fetch_status &lt;&gt; -2)
	BEGIN
		-- Do some action with item value.
		EXEC('GRANT EXECUTE ON ['+@item+'] TO ['+@user+']')
	END
	FETCH NEXT FROM items INTO @item
END
DEALLOCATE items</value>
            </setting>
            <setting name="XcetSourceTextBox" serializeAs="String">
                <value>--- &lt;summary&gt;
--- Insert new record into table.
--- &lt;/summary&gt;
--- &lt;param name="RecordId"&gt;Unique record Id.&lt;/param&gt;
--- &lt;param name="RecordGuid"&gt;Set Global Unique Identifier.&lt;/param&gt;
--- &lt;param name="SomeValue"&gt;Set record value.&lt;/param&gt;
--- &lt;param name="RecordEnabled"&gt;Enable or disable record.&lt;/param&gt;
--- &lt;returns&gt;Unique Id of new record.&lt;/returns&gt;
--- &lt;remarks&gt;
--- History:
---     2007-11-02 - Created by Smith.
---     2007-11-23 - Modified by Neo.
--- &lt;/remarks&gt;
CREATE PROCEDURE [dbo].[solution_Category_InsertRecord] (
    @RecordId Int,
    @RecordGuid UniqueIdentifier,
    @SomeValue NVarChar(200),
    @RecordEnabled Bit 
)
AS
-- Stored procedure starts here...
--- ----------------------------
--------------------------------</value>
            </setting>
            <setting name="XcetRegExTextBox" serializeAs="String">
                <value />
            </setting>
        </JocysCom.Sql.ScriptsGenerator.Properties.Settings>
    </userSettings>
</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions