Click here to Skip to main content
Click here to Skip to main content
Articles » Database » Database » SQL » Downloads
 
Add your own
alternative version
Go to top

SQL XML Documentation

, 29 Feb 2008
How to create and compile SQL XML Documentation comments
JocysComSqlScriptsGenerator.zip
DatabaseToXml
bin
Debug
JocysCom.Sql.DatabaseToXml.exe
JocysCom.Sql.DatabaseToXml.vshost.exe
JocysCom.Sql.DatabaseToXml.vshost.exe.manifest
JocysCom.Sql.XmlDocumentation.dll
JocysCom.Sql.DatabaseToXml.csproj.user
Properties
Resources
WinApp
bin
Debug
Interop.ADODB.dll
Interop.CDO.dll
JocysCom.ClassLibrary.dll
JocysCom.Sql.ScriptsGenerator.exe
JocysCom.Sql.ScriptsGenerator.vshost.exe
JocysCom.Sql.ScriptsGenerator.vshost.exe.manifest
JocysCom.Sql.XmlDocumentation.dll
Microsoft.Data.ConnectionUI.Dialog.dll
Microsoft.Data.ConnectionUI.dll
Microsoft.SqlServer.ConnectionInfo.dll
Microsoft.SqlServer.SqlEnum.dll
Controls
GenerateActionScripts
Jocys.com SQL Scripts Generator.csproj.user
Properties
Settings.settings
XmlDocumentation
bin
Debug
JocysCom.Sql.XmlDocumentation.dll
JocysCom.Sql.XmlDocumentation.csproj.user
Properties
SQL Scripts Generator.suo
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace JocysCom.Sql.ScriptsGenerator.Controls
{
	public partial class GenerateActionScripts
	{
		private void RefreshColumnsTextBox()
		{
			if (table != null)
			{
				ColumnsTextBox.Text = GetColumns(table, (int)ColumnsTabIdentNumericUpDown.Value, ColumnsPrefixTextBox.Text);
			}
		}

		private void ColumnsTabIdentNumericUpDown_ValueChanged(object sender, EventArgs e)
		{
			RefreshColumnsTextBox();
		}

		private void ColumnsPrefixTextBox_TextChanged(object sender, EventArgs e)
		{
			RefreshColumnsTextBox();
		}

		private string GetColumns(Microsoft.SqlServer.Management.Smo.Table table, int ident, string prefix)
		{
			string tabs = new StringBuilder().Append('\t', ident).ToString();
			string text = GetColumnsList(table, ParamListType.All, "");
			StringBuilder sb = new StringBuilder();
			// Use a StringReader.
			System.IO.StringReader reader = new System.IO.StringReader(text);
			string line = string.Empty;
			// Cycle through while there are lines to read.
			while ((line = reader.ReadLine()) != null)
			{
				// Add the line.
				sb.AppendLine(tabs + prefix +line);
			}
			return sb.ToString();
		}


	}
}

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)

Share

About the Author

EJocys
Software Developer (Senior)
United Kingdom United Kingdom
No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.140921.1 | Last Updated 29 Feb 2008
Article Copyright 2007 by EJocys
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid