Click here to Skip to main content
16,012,468 members
Articles / Web Development / ASP.NET

Microsoft SQL Server Database Documentor

Rate me:
Please Sign up or sign in to vote.
3.31/5 (5 votes)
17 Aug 2006CPOL1 min read 54.6K   681   50   12
A Microsoft SQL Server database documentor, using Crystal Reports.

Sample Image - dt2.jpg

Introduction

This project uses Crystal Reports to generate a database schema listing on a Microsoft SQL Server database. The listing includes extended column information including column descriptions. This project requires Visual Studio 2003 or 2005, .NET Framework 1.1, and the Crystal Reports for Visual Studio component.

The generated report lists column names, data types, size, description, etc. Primary key columns are preceded by an asterisk. Columns names are italicized when the column is allowed to be NULL in the table.

Background

One day I set out to document a database that I had been studying. Using the Table Designer in Enterprise Manager, I began entering descriptions of the columns of each table. Later on, I discovered that there is no way to print out the column descriptions using EM. I did a little research and discovered how to get the descriptions out of the sysobjects table.

Image 2

Using the Code

The project can be built and run with just a little setup. To install the project, unzip it to a directory of your choosing, for instance c:\projects\dbadoc. Create a virtual directory in IIS and set the path to c:\projects\dbadoc\client.

Open Visual Studio and build the project. If you are using VS 2005, the project should convert with no problems. That's it!

Points of Interest

  • Don't ask me why I used VB for the code-behind and C# for the data classes. No, really, don't ask.
  • I don't know the configuration steps or failure characteristics when Crystal Reports is not installed and configured with Visual Studio. If you go through this setup, kindly email me and I'll update with those directions.

License

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


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralError Loading in VS2005 Pin
MarcEleazar30-Apr-08 15:43
MarcEleazar30-Apr-08 15:43 
I'm still getting errors when I load dbadoc, I have already install C#.

I hope that this problems can be resolved.

These are the errors that I get:

Warning 1 Namespace or type specified in the Imports 'DMI.Dbadoc.Data' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\dbadoc\client\Default.aspx.vb 1

Error 2 Type 'DbaFill' is not defined. C:\dbadoc\client\Default.aspx.vb 60

Warning 3 Namespace or type specified in the Imports 'DMI.Dbadoc.Data' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\dbadoc\client\SchemaReport.aspx.vb 5

Error 4 Type 'DbaFill' is not defined. C:\dbadoc\client\SchemaReport.aspx.vb 40

Error 5 Type 'DbaFill' is not defined. C:\dbadoc\client\SchemaReport.aspx.vb 46

Warning 6 Unused local variable: 'startPos'. C:\dbadoc\client\App_Code\CustomErrorHandler.vb 54 13 http://localhost/dbaDoc/

Warning 7 Namespace or type specified in the Imports 'DMI.Dbadoc.Data' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\dbadoc\client\Default.aspx.vb 1 9 http://localhost/dbaDoc/

Error 8 Type 'DbaFill' is not defined. C:\dbadoc\client\Default.aspx.vb 60 26 http://localhost/dbaDoc/

Warning 9 The element 'compilation' has invalid child element 'compilers'. List of possible elements expected: 'assemblies, buildProviders, codeSubDirectories, expressionBuilders'. C:\dbadoc\client\Web.config 13 5 http://localhost/dbaDoc/

Message 10 Could not find schema information for the element 'businessObjects'. C:\dbadoc\client\Web.config 77 3 http://localhost/dbaDoc/

Message 11 Could not find schema information for the element 'crystalReports'. C:\dbadoc\client\Web.config 77 20 http://localhost/dbaDoc/

Message 12 Could not find schema information for the element 'reportMappings'. C:\dbadoc\client\Web.config 77 36 http://localhost/dbaDoc/

Message 13 Could not find schema information for the element 'add'. C:\dbadoc\client\Web.config 77 52 http://localhost/dbaDoc/

Message 14 Could not find schema information for the attribute 'reportName'. C:\dbadoc\client\Web.config 77 56 http://localhost/dbaDoc/

Message 15 Could not find schema information for the attribute 'path'. C:\dbadoc\client\Web.config 77 80 http://localhost/dbaDoc/


------ Build started: Project: http://localhost/dbaDoc/, Configuration: Debug .NET ------
Validating Web Site
Building directory '/dbaDoc/'.

C:\dbadoc\client\Default.aspx.vb(1,0): warning BC40056: Namespace or type specified in the Imports 'DMI.Dbadoc.Data' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
C:\dbadoc\client\Default.aspx.vb(60,0): error BC30002: Type 'DbaFill' is not defined.
C:\dbadoc\client\SchemaReport.aspx.vb(5,0): warning BC40056: Namespace or type specified in the Imports 'DMI.Dbadoc.Data' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
C:\dbadoc\client\SchemaReport.aspx.vb(40,0): error BC30002: Type 'DbaFill' is not defined.
C:\dbadoc\client\SchemaReport.aspx.vb(46,0): error BC30002: Type 'DbaFill' is not defined.
Validation Complete
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

This software looks good, if only I can run it.

regards,

Marc
GeneralErrors while loading on VS 2005 Pin
MarcEleazar21-Apr-08 20:29
MarcEleazar21-Apr-08 20:29 
GeneraldbaDoc - Error in loading the Solution Pin
MarcEleazar5-Mar-08 17:41
MarcEleazar5-Mar-08 17:41 
GeneralRe: dbaDoc - Error in loading the Solution Pin
gogglin7-Mar-08 20:25
gogglin7-Mar-08 20:25 
QuestionGreat Concept, But Nothing Shows? Pin
Member 199949326-Feb-08 5:11
Member 199949326-Feb-08 5:11 
GeneralRe: Great Concept, But Nothing Shows? Pin
gogglin7-Mar-08 20:22
gogglin7-Mar-08 20:22 
GeneralRunning into errors on compile Pin
e4thenf423-Jun-07 11:28
e4thenf423-Jun-07 11:28 
GeneralRe: Running into errors on compile Pin
gogglin28-Jun-07 4:10
gogglin28-Jun-07 4:10 
GeneralReporting Services Pin
RogerMCT23-Aug-06 5:13
RogerMCT23-Aug-06 5:13 
AnswerRe: Reporting Services Pin
gogglin23-Aug-06 11:51
gogglin23-Aug-06 11:51 
GeneralNeat! Pin
amarie22-Aug-06 4:53
amarie22-Aug-06 4:53 
GeneralRe: Neat! Pin
gogglin23-Aug-06 11:42
gogglin23-Aug-06 11:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.