CodeSmith Community
Your Code. Your Way. Faster!

Database HTML Documentation Template

Latest post 02-13-2007 2:44 AM by KMax. 30 replies.
  • 01-06-2004 3:20 PM In reply to

    • ejsmith
    • Top 10 Contributor
    • Joined on 12-27-2002
    • Dallas, TX USA
    • Posts 2,205
    • Points 922,460

    RE: Database HTML Documentation Template

    Jason,

    All but the sproc dependancy information is available through SchemaExplorer. I think the more that we make full use of SchemaExplorer the better because not only is it a GREAT set of templates to generate documentation, but it's also a GREAT set of templates for demonstrating the capabilities of SchemaExplorer.

    Thanks,
    Eric J. Smith

    Eric J. Smith
    CodeSmith Tools, LLC
    Chief Software Architect

    • Post Points: 35
  • 01-16-2004 3:54 PM In reply to

    • VikingCoder
    • Top 500 Contributor
    • Joined on 11-30-2003
    • Westchester, NY
    • Posts 11
    • Points 720

    RE: Database HTML Documentation Template

    Jason,

    I needed to make a few changes in order for it to work on my Oracle DB.

    Basicly lines like

    if (column.ExtendedProperties["CS_IsIdentity"].Value == "true")

    needed to be changed to

    if (null!=column.ExtendedProperties["CS_IsIdentity"] && column.ExtendedProperties["CS_IsIdentity"].Value == "true")

    Thanks for a great script!

    Mike

    Post Edited (VikingCoder) : 1/16/2004 3:56:27 PM GMT

    • Post Points: 5
  • 04-20-2004 4:31 PM In reply to

    • bertcord
    • Top 100 Contributor
    • Joined on 12-14-2003
    • Posts 47
    • Points 1,240

    RE: Database HTML Documentation Template

    The following templates are addons for the DBdocumenter.  IT creates the hhp file and a BAT file.  After running the templates run the generated bat file to compile the HTML docs into a CHM.
     
    The zip contains the following
    1.  hhp.cst - generates the HHP file
    2.  CompileDocs.cst - generates the the BAT file
    3.  master.cst - replaces the current master file.  Adds code that calls the 2 new templates.
     
    Just copy these to the DBDocumenter director and you are good to go.
     
    Bert
     
     
     
    • Post Points: 5
  • 04-20-2004 6:17 PM In reply to

    • ejsmith
    • Top 10 Contributor
    • Joined on 12-27-2002
    • Dallas, TX USA
    • Posts 2,205
    • Points 922,460

    RE: Database HTML Documentation Template

    Bert,

    That rocks!! Very cool.

    Eric J. Smith

    Eric J. Smith
    CodeSmith Tools, LLC
    Chief Software Architect

    • Post Points: 5
  • 05-29-2004 3:02 PM In reply to

    • MAltadonna
    • Top 100 Contributor
    • Joined on 06-13-2003
    • Vermont
    • Posts 49
    • Points 5,395

    RE: Database HTML Documentation Template

    Jason,
     
    I just want to say thanks again for this awesome resource. It has saved me untold hours of frustration while implementing a new ERP system with some sketchy documentation from the Software Vendor. They have great docs on how to run the system, but very little on what the underlying DB structure is ... so it goes. Anyway, here is my simple contribution to this venture. I created a new template hhc.cst that will render the contents file for the compiled help app. This basically takes the place of the summary frame in your style sheet and makes it much easier to read and find the info you need. (I have 1525 tables, 2600 sprocs and 550 views (in the Main DB) that this scripted and compiled nicely - after a few hours of intense crunching)
     
    The attached file replaces the master.cst, hhp.cst and adds the hhc.cst. I am looking into how to achieve indexing the help file as well (proposed hhk.cst) to again improve the generation of the help file. That is on the back burner as I continue to get this new system up and customized. (Anyone using MAS 500 by any chance and have work they would like to share?)
     
    Thanks again,
     
     Sorry had my .hhk file in there for testing.....

    Post Edited (Matthew Altadonna) : 5/29/2004 3:14:09 PM GMT

    • Post Points: 5
  • 05-31-2004 2:22 AM In reply to

    • JoeF
    • Top 25 Contributor
    • Joined on 09-28-2003
    • Syracuse, NY
    • Posts 158
    • Points 1,315

    RE: Database HTML Documentation Template

    Matt, Bert and Jason,
    Wow!
    Once you get everything downloaded it runs great.
    I love the compiled help file.
    You can search for something and find every table, view and SP it is in.
     
    Very cool.
     
    Thanks!
     
    Joe
     
    • Post Points: 5
  • 10-22-2005 2:33 PM In reply to

    RE: Database HTML Documentation Template

    Hi.. I just purchased a licence of CodeSmith this morning and I am having a little trouble using the DbDocumentor Template.

    I used it a couple of months ago with the trial version (3.1) no problems.. but now.. either I am working of an older version of the template.. Or I am doing something wrong.

    First, when I would try to load the Master.CST. I would get numerous errors. I removed the comments line at the beginning of all files used by the template... reloaded.. it went ok.

    Now I filled in the properties.. Database , Server Name.. clicked generate.. 10-20 seconds later I get this..

    System.NullReferenceException: Object reference not set to an instance of an object.
    at _CodeSmith.sprocs_cst.GenerateProcTextHTML(DatabaseSchema database)
    at _CodeSmith.sprocs_cst.Go()
    at _CodeSmith.sprocs_cst.__RenderMethod1(TextWriter writer, Control control)
    at CodeSmith.Engine.DelegateControl.Render(TextWriter writer)
    at CodeSmith.Engine.Control.RenderChildren(TextWriter writer)
    at CodeSmith.Engine.CodeTemplate.Render(TextWriter writer)
    at CodeSmith.Engine.CodeTemplate.RenderToFile(String path, Boolean overwrite)
    at _CodeSmith.master_cst.Go()
    at _CodeSmith.master_cst.__RenderMethod1(TextWriter writer, Control control)
    at CodeSmith.Engine.DelegateControl.Render(TextWriter writer)
    at CodeSmith.Engine.Control.RenderChildren(TextWriter writer)
    at CodeSmith.Engine.CodeTemplate.Render(TextWriter writer)
    at CodeSmith.Engine.CodeTemplate.RenderToString()
    at CodeSmith.Gui.CodeTemplateGenerator.b(Object , EventArgs )


    I am sure I am missing the obvious... Anyone can help ?

    Thanks in advance...

    Fred
    • Post Points: 5
  • 10-22-2005 8:14 PM In reply to

    • rawi
    • Not Ranked
    • Joined on 10-09-2005
    • Posts 3
    • Points 15

    RE: Database HTML Documentation Template

    Fred,

    I had the same error - the problem is that sproc_text.cst does'nt find "AylarSolutions.Highlight.dll" which is referenced as an assembly in the top of the template file. The error does show up as a NullReferenceException, because StoredProceduresTextTemplate returns <undefined>, but the code tries to access

    StoredProceduresTextTemplate.SetProperty("SourceCommand", ...
    which is not initialized because of the underlying assembly reference missing.
     
    Quick solution: move the AylarSolutions.Highlight.dll into the \bin directory of your CodeSmith program path.
    I'am not yet very familiar with CodeSmith, so I would expect to tell cs.exe where it can find missing dll's, or is there a assembly reference option which I did'nt found?
     
    RaWi
    • Post Points: 5
  • 12-14-2005 7:02 PM In reply to

    • bschmitt
    • Not Ranked
    • Joined on 12-14-2005
    • Posts 1
    • Points 35

    RE: Database HTML Documentation Template

    Does anyone have an updated Compiled Help template?
    It does not seem to work.
    Or if someone can explain how to edit it myself. I attempted to, but it seems to complain because there is a mixture of VB and C#...
    I think it is expecting C# when it is processing the VB portions. This was after I edited it, so I could be wrong.
    I tried to edit the master.cst file that comes with Codesmith, to add the portion that deals with the Help File.

    The master.cst that comes in the Compiled help example above gives a null ref exception looking for index.html

    Thanks
    Brian
    • Post Points: 35
  • 03-15-2006 9:53 AM In reply to

    • H4L0PR1CK
    • Not Ranked
    • Joined on 03-15-2006
    • Posts 1
    • Points 43

    Re: RE: Database HTML Documentation Template

    This looks great, thanks for the superb contribution.

     

    I don't suppose anyone has ported this to work with CodeSmith 3.2 yet?

    • Post Points: 35
  • 04-10-2006 11:41 AM In reply to

    Re: Database HTML Documentation Template

    Wow, this is really neat. Great tool. Just two comments:

    1) If a db has no views or stored procedures the detail section (View Details/Stored Procedure Details) shows "The page cannot be displayed".

    2) Bild.bat assumes you have version 3.0 of codesmith. This is very minor and really easy to fix, of course. But maybe the path could be picked up from some environment variable.

    Again, great tool.

    • Post Points: 5
  • 04-10-2006 11:46 AM In reply to

    Re: RE: Database HTML Documentation Template

    It does work for 3.2 with a minor modification. Open build.bat and change the path to 3.2 instead of 3.0 and it should work just fine. At least for me it did.
    • Post Points: 35
  • 06-14-2006 10:03 AM In reply to

    • Red Angel
    • Not Ranked
    • Joined on 06-14-2006
    • Ivrea (Italy)
    • Posts 3
    • Points 15

    Re: RE: Database HTML Documentation Template

    I've just downloaded codesmith and i've find a bug with this template, i think.

    I haven't yet time to fix it by myself (first i should read some documentation indeed) so i expose the problem:

     

    I have a ' char in some of my fileds name and it cause a crash in running build.bat (i'm using Codesmith 3.1.6)

    here is the dump:
    C:\Program Files\CodeSmith\v3.0\SampleTemplates\DBDocumenter>build
    CodeSmith DBDocumenter Templates v3.0
    Author:  Jason Alexander (
    jason@ngallery.org), Eric J. Smith
    Website:
    http://www.ngallery.org/dbdocumenter/
    -------------------------------------------------------------
    Beginning documentation...
    System.Data.SqlClient.SqlException: Line 10: Incorrect syntax near 'EM'.
    Unclosed quotation mark before the character string ') p'.
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior
    , RunBehavior runBehavior, Boolean returnStream)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
       at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(Comm
    andBehavior behavior)
       at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startR
    ecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior be
    havior)
       at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
    Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

       at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
       at a.a(String )
       at SchemaExplorer.SqlSchemaProvider.a(String , String , String , String , Str
    ing , String , String )
       at SchemaExplorer.SqlSchemaProvider.GetExtendedProperties(String connectionSt
    ring, SchemaObjectBase schemaObject)
       at SchemaExplorer.SchemaObjectBase.get_ExtendedProperties()
       at _CodeSmith.TableDetailTemplate.__RenderMethod1(TextWriter writer, Control
    control)
       at CodeSmith.Engine.DelegateControl.Render(TextWriter writer)
       at CodeSmith.Engine.Control.RenderChildren(TextWriter writer)
       at CodeSmith.Engine.CodeTemplate.Render(TextWriter writer)
       at CodeSmith.Engine.CodeTemplate.RenderToFile(String path, Boolean overwrite)

       at _CodeSmith.TablesTemplate.Render(TextWriter writer)
       at CodeSmith.Engine.CodeTemplate.RenderToFile(String path, Boolean overwrite)

       at _CodeSmith.master_cst.Render(TextWriter writer)
       at CodeSmithConsole.EntryPoint.a(String[] )
    Done.

    i've checked if i have some results anyway and i found that at least some tables where compiled, so i checked the last that i supposed rised the error and i found the problem (i suppose)

    the table has some fields containing the ' char ie "Quantita' EM/EF", i hope this helps fixing the problem, keep up with this nice template

    Fabio Angela www.redangel.it
    • Post Points: 5
  • 02-07-2007 9:02 AM In reply to

    • KMax
    • Not Ranked
    • Joined on 03-24-2005
    • Czech republic
    • Posts 5
    • Points 25

    Re: Database HTML Documentation Template

    Hi, I have tried to visit http://www.ngallery.org/dbdocumenter/ but I have got only this message :( Service Unavailable. Is there any problems?
    • Post Points: 5
  • 02-07-2007 9:17 AM In reply to

    • KMax
    • Not Ranked
    • Joined on 03-24-2005
    • Czech republic
    • Posts 5
    • Points 25

    DBDocumenter - codepage? utf-8?

    Hey,
    I use last DBDocumenter which is included in CodeSmith 4.0 and I have one problem.

    Is there any possibility to set output codepage for rendered html documents?

    Because I have MS_Description in codepage Win1250 or in Utf-8 and in the html file is "?" mark instead of our national language letter.

    Thanks,
    KMax

    Filed under: , ,
    • Post Points: 5
Page 2 of 3 (31 items) < Previous 1 2 3 Next > | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems