Click here to Skip to main content
15,892,537 members
Articles / Desktop Programming / Win32

SQL Class Shell Generator

Rate me:
Please Sign up or sign in to vote.
4.87/5 (65 votes)
8 Jan 2009CPOL6 min read 219.8K   3.3K   233  
Generate class shells from SQL Server database tables, (SQL 2005 & 2008 only). Output languages supported: C# and VB.NET.
��<HTML><HEAD>

<META NAME="COPYRIGHT" CONTENT="2008 � Paw Jershauge">

<META NAME="DESCRIPTION" CONTENT="This site contains information about the SQLReader  Class Library.">

<META NAME="AUTHOR" CONTENT="Paw Jershauge">

<META NAME="CODING" CONTENT="Paw Jershauge">

<META NAME="DEVELOPER" CONTENT="Paw Jershauge [http://paw.jershauge.dk]">

<META NAME="GENERATOR" CONTENT="Assembly To HTML by Paw Jershauge">

<LINK REL="STYLESHEET" TYPE="TEXT/CSS" HREF="../dat/msdn2.css"></LINK><SCRIPT LANGUAGE="Javascript1.2" SRC="../dat/jscr.js"></SCRIPT>

<TITLE>SQLReader by Paw Jershauge</TITLE></HEAD><BODY CLASS="typeclass" onunload="wo('../toolbar.htm','TOOLBAR');CurrentObject('...');">

<P CLASS="medium"><IMG SRC="../img/minus.gif" WIDTH="16" HEIGHT="16" BORDER="0" CLASS="midmgR" ID="collapse_expandimg" NAME="collapse_expandimg"><A NAME="collapse_expand" href="#collapse_expand" onclick="plusminustglcontentshowing();tglContent();" CLASS="liketext">Collapse/Expand content</A></P>

SQLReader  Class Library

<H1>ExtendedProperty Public Class</H1>

<P><B>Namespace:</B> <A HREF="SQLReader.htm">SQLReader</A></P>

<P><B>Assembly:</B> <A HREF="SQLReader(1.0.0.0).htm">SQLReader</A> ( in SQLReader.dll )</P>

<P><B>Basetype(s): </B><A HREF="SQLReader.AbstractSQLObject.htm" TARGET="_self">SQLReader.AbstractSQLObject</A></P>

<H3>In this document the following highlight are available:</H3>

<UL><LI><A HREF="#ANAME_PropertyBox">Properties (9)</A></LI><LI><A HREF="#ANAME_SeeAlso_RefBox">See also</A></LI></UL><A NAME="ANAME_PropertyBox"></A><H2 CLASS="clk" onclick="plusminustgl('PropertyBox');"><IMG SRC="../img/minus.gif" WIDTH="16" HEIGHT="16" BORDER="0" CLASS="midmgR" ID="PropertyBoxImg" NAME="PropertyBoxImg">Properties</H2>

<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="100%" ID="PropertyBox" NAME="PropertyBox"><TR><TD CLASS="tdhead">&nbsp;</TD><TD CLASS="tdhead">Name</TD><TD CLASS="tdhead">Type</TD><TD CLASS="tdhead">Description</TD></TR>

<TR><TD CLASS="tditemimg"><IMG SRC="../objimg/Properties.png" WIDTH="16" HEIGHT="16" BORDER="0" CLASS="mid" TITLE="Public Property"></TD><TD CLASS="tditem" nowrap>class_desc</TD><TD CLASS="tditem"><A HREF="http://msdn2.microsoft.com/en-us/library/System.String.aspx" TARGET="_blank" CLASS="aRef">String</A></TD><TD CLASS="tditem">Description of the class on which the extended property exists. Can be one of the following:
DATABASE
OBJECT_OR_COLUMN
PARAMETER
SCHEMA
DATABASE_PRINCIPAL
ASSEMBLY
TYPE
INDEX
XML_SCHEMA_COLLECTION
MESSAGE_TYPE
SERVICE_CONTRACT
SERVICE
REMOTE_SERVICE_BINDING
ROUTE
DATASPACE
PARTITION_FUNCTION
DATABASE_FIL&nbsp;</TD></TR>

<TR><TD CLASS="tditemimg"><IMG SRC="../objimg/Properties.png" WIDTH="16" HEIGHT="16" BORDER="0" CLASS="mid" TITLE="Public Property"></TD><TD CLASS="tditem" nowrap>class_id</TD><TD CLASS="tditem"><A HREF="SQLReader.ExtendedProperty_Type.htm" TARGET="_self" CLASS="aRef">ExtendedProperty_Type</A></TD><TD CLASS="tditem">Identifies the class of item on which the property exists. Can be one of the following:
0 = Database
1 = Object or column
2 = Parameter
3 = Schema
4 = Database principal
5 = Assembly
6 = Type
7 = Index
10 = XML schema collection
15 = Message type
16 = Service contract
17 = Service
18 = Remote service binding
19 = Route
20 = Dataspace (filegroup or partition scheme)
21 = Partition function
22 = Database fil&nbsp;</TD></TR>

<TR><TD CLASS="tditemimg"><IMG SRC="../objimg/Properties.png" WIDTH="16" HEIGHT="16" BORDER="0" CLASS="mid" TITLE="Public Property"></TD><TD CLASS="tditem" nowrap>major_id</TD><TD CLASS="tditem"><A HREF="http://msdn2.microsoft.com/en-us/library/System.Int32.aspx" TARGET="_blank" CLASS="aRef">Int32</A></TD><TD CLASS="tditem">ID of the item on which the extended property exists, interpreted according to its class. For most items, this is the ID that applies to what the class represents. Interpretation for nonstandard major IDs is as follows:
If class is 0, major_id is always 0.
If class is 1, 2, or 7 = major_id is object_id&nbsp;</TD></TR>

<TR><TD CLASS="tditemimg"><IMG SRC="../objimg/Properties.png" WIDTH="16" HEIGHT="16" BORDER="0" CLASS="mid" TITLE="Public Property"></TD><TD CLASS="tditem" nowrap>minor_id</TD><TD CLASS="tditem"><A HREF="http://msdn2.microsoft.com/en-us/library/System.Int32.aspx" TARGET="_blank" CLASS="aRef">Int32</A></TD><TD CLASS="tditem">Secondary ID of the item on which the extended property exists, interpreted according to its class. For most items this is 0; otherwise, the ID is as follows:
If class = 1, minor_id is the column_id if column, else 0 if object.
If class = 2, minor_id is the parameter_id.
If class 7 = minor _id is the index_id&nbsp;</TD></TR>

<TR><TD CLASS="tditemimg"><IMG SRC="../objimg/Properties.png" WIDTH="16" HEIGHT="16" BORDER="0" CLASS="mid" TITLE="Public Property"></TD><TD CLASS="tditem" nowrap>name</TD><TD CLASS="tditem"><A HREF="http://msdn2.microsoft.com/en-us/library/System.String.aspx" TARGET="_blank" CLASS="aRef">String</A></TD><TD CLASS="tditem">Property name, unique with class, major_id, and minor_id&nbsp;</TD></TR>

<TR><TD CLASS="tditemimg"><IMG SRC="../objimg/Properties.png" WIDTH="16" HEIGHT="16" BORDER="0" CLASS="mid" TITLE="Public Virtual Property"></TD><TD CLASS="tditem" nowrap>ObjectName</TD><TD CLASS="tditem"><A HREF="http://msdn2.microsoft.com/en-us/library/System.String.aspx" TARGET="_blank" CLASS="aRef">String</A></TD><TD CLASS="tditem">&nbsp;</TD></TR>

<TR><TD CLASS="tditemimg"><IMG SRC="../objimg/Properties.png" WIDTH="16" HEIGHT="16" BORDER="0" CLASS="mid" TITLE="Public Property"></TD><TD CLASS="tditem" nowrap>Owner</TD><TD CLASS="tditem"><A HREF="SQLReader.Database.htm" TARGET="_self" CLASS="aRef">Database</A></TD><TD CLASS="tditem">&nbsp;</TD></TR>

<TR><TD CLASS="tditemimg"><IMG SRC="../objimg/Properties.png" WIDTH="16" HEIGHT="16" BORDER="0" CLASS="mid" TITLE="Public Virtual Property"></TD><TD CLASS="tditem" nowrap>UniqueObjectName</TD><TD CLASS="tditem"><A HREF="http://msdn2.microsoft.com/en-us/library/System.String.aspx" TARGET="_blank" CLASS="aRef">String</A></TD><TD CLASS="tditem">&nbsp;</TD></TR>

<TR><TD CLASS="tditemimg"><IMG SRC="../objimg/Properties.png" WIDTH="16" HEIGHT="16" BORDER="0" CLASS="mid" TITLE="Public Property"></TD><TD CLASS="tditem" nowrap>value</TD><TD CLASS="tditem"><A HREF="http://msdn2.microsoft.com/en-us/library/System.Object.aspx" TARGET="_blank" CLASS="aRef">Object</A></TD><TD CLASS="tditem">Value of the extended property&nbsp;</TD></TR>

</TABLE>

<H2 CLASS="clk" onclick="plusminustgl('SeeAlso_RefBox');"><IMG SRC="../img/minus.gif" WIDTH="16" HEIGHT="16" BORDER="0" CLASS="midmgR" ID="SeeAlso_RefBoxImg" NAME="SeeAlso_RefBoxImg">See Also:</H2>

<A NAME="ANAME_SeeAlso_RefBox"></A><DIV ID="SeeAlso_RefBox" NAME="SeeAlso_RefBox">

&bull; <A HREF="SQLReader.AbstractSQLObject.htm" TARGET="_self">SQLReader.AbstractSQLObject</A>

<SPAN>&bull; <A HREF="SQLReader.Database.htm" TARGET="_self">Database</A></SPAN>&nbsp;&nbsp;

<SPAN>&bull; <A HREF="SQLReader.ExtendedProperty_Type.htm" TARGET="_self">ExtendedProperty_Type</A></SPAN>&nbsp;&nbsp;



</DIV>

<SCRIPT LANGUAGE="Javascript1.2">

parent.MENU.ShDiv('SQLReader(1.0.0.0)_Assembly');

parent.MENU.ShDiv('SQLReader.SQLReader_Namespace');

parent.MENU.ShDiv('SQLReader.SQLReader_Class');

parent.MENU.location=parent.MENU.location + '#SQLReader_SQLReader.ExtendedProperty';

CopyRight('Copyright � Paw Jershauge 2008');

CurrentObject('ExtendedProperty Class');

</SCRIPT>

</BODY></HTML>

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
Denmark Denmark

Comments and Discussions