CodeSmith Community
Your Code. Your Way. Faster!

Failure to generate for Northwind

Latest post 04-22-2008 7:24 AM by blake05. 3 replies.
  • 04-14-2008 4:46 AM

    • paulj
    • Not Ranked
    • Joined on 12-14-2007
    • Posts 6
    • Points 150

    Failure to generate for Northwind

     I have a clean install of NetTiers and am trying to generate a project for the Northwind database which cones with SQL Server 2000 Developer Edition.

    However it fails to build for all tables with the error message below.

    System.InvalidOperationException: Failed to compare two elements in the array. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at SchemaExplorer.TableKeySchema..ctor(DatabaseSchema database, String name, String[ foreignKeyMemberColumns, String foreignKeyTableOwner, String foreignKeyTable, String[ primaryKeyMemberColumns, String primaryKeyTableOwner, String primaryKeyTable)
       at SchemaExplorer.TableKeySchema..ctor(DatabaseSchema database, String name, String[ foreignKeyMemberColumns, String foreignKeyTableOwner, String foreignKeyTable, String[ primaryKeyMemberColumns, String primaryKeyTableOwner, String primaryKeyTable, ExtendedProperty[ extendedProperties)
       at SchemaExplorer.SqlSchemaProvider.GetTableKeys(String connectionString, TableSchema table)
       at SchemaExplorer.TableSchema.get_Keys()
       at SchemaExplorer.TableSchema.get_ForeignKeys()
       at SchemaExplorer.TableSchema.a(TableSchema A_0, TableSchemaCollection A_1)
       at SchemaExplorer.TableSchema.IsDependantOf(TableSchema table)
       at SchemaExplorer.TableDependancyComparer.Compare(Object x, Object y)
       at System.Array.SorterObjectArray.QuickSort(Int32 left, Int32 right)
       --- End of inner exception stack trace ---

     

    Any pointers?

    If I just choose to generate using say the "categories" table it builds exactly as I would expect so the setup works, just not for the full set.

     

    Cheers Paul

     

    Filed under:
    • Post Points: 35
  • 04-14-2008 9:37 PM In reply to

    • blake05
    • Top 25 Contributor
    • Joined on 04-03-2008
    • Wisconsin
    • Posts 314
    • Points 5,565

    Re: Failure to generate for Northwind

    Reply |Contact |Answer

    Hello Paul,

    I am using SQL Server 2005, but went and installed the NorthWind database and generated every table and view fine.   Could you try restoring the NorthWind database as something might have altered to it. And try to run the template again, selecting every table and view. If it throws an error could you screenshot the error and save your settings to a csp file and attach it to a thread below.

    Thanks

    -Blake Niemyjski

    Blake Niemyjski

    CodeSmith Tools, LLC Support Specialist

    Blog: http://windowscoding.com/blogs/blake/

    ----------------------------------------------------------------------
     Member of the .NetTiers team | Visit http://www.nettiers.com
    ----------------------------------------------------------------------

    • Post Points: 35
  • 04-22-2008 5:45 AM In reply to

    • paulj
    • Not Ranked
    • Joined on 12-14-2007
    • Posts 6
    • Points 150

    Re: Failure to generate for Northwind

     Now I know you won't believe me but tried to build it again, just given it a diiferent output folder and its built.

    NOT KNOWINGLY ALTERED ANYTHING:-)

    Cheers   Paul

     

    • Post Points: 35
  • 04-22-2008 7:24 AM In reply to

    • blake05
    • Top 25 Contributor
    • Joined on 04-03-2008
    • Wisconsin
    • Posts 314
    • Points 5,565

    Re: Failure to generate for Northwind

     :-)

    Thanks

    -Blake Niemyjski

    Blake Niemyjski

    CodeSmith Tools, LLC Support Specialist

    Blog: http://windowscoding.com/blogs/blake/

    ----------------------------------------------------------------------
     Member of the .NetTiers team | Visit http://www.nettiers.com
    ----------------------------------------------------------------------

    • Post Points: 5
Page 1 of 1 (4 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems