SubSonic Forums
All Your Database Are Belong To Us

Schema not being generated for second provider

Latest post 08-07-2008 9:45 PM by yitzchok. 2 replies.
  • 08-07-2008 1:21 PM

    Schema not being generated for second provider

    I have two providers in a web project and it appears that the schema is not being generated for any of my tables and views in the second provider. SubStage builds the table and view classes ok - I've visually compared the classes generated for my second provider to those of my first provider and they seem to be complete; however, when I try to use any of the objects, I receive an "Object reference not set..." error.

    More specifically, I have traced the error down to Line 591 of SqlDataProvider.cs:

    DataRow[] drColumns = dsColumns.Tables[Name].Select(String.Format("TableName ='{0}'", tableName), "OrdinalPosition ASC");

    For some reason, the dsColumns dataset does not contain any column information for any of my objects in the second data provider.

    Perhaps I am missing a setting somewhere that tells SubSonic to generate the column information for additional providers.

    Any thoughts from anyone?

    Thank you for your help in advance.

  • 08-07-2008 4:34 PM In reply to

    Re: Schema not being generated for second provider

    Reply |Contact |Answer

    I found my error in a config file - wrong connection string name. I'm dumb.

  • 08-07-2008 9:45 PM In reply to

    Re: Schema not being generated for second provider

    Thats not called dumb that a normal mistake done by Professional Developers :)

    If I am I because I am I, and You are You because You are You, then I am I, and you are you. But If I am I because You are You, and You are You because I am I, then I am not I and You are not You. -Rabbi of Kotzk

Page 1 of 1 (3 items) | RSS