Last post Nov 11, 2008 07:43 AM by sandeepg
Aug 14, 2007 02:30 PM|TripleThreat|LINK
First of all "Object reference not set to an instance of an object." isn't very informational to me when I call:
Database db = Database.CreateDatabase();
Database db = Database.CreateDatabase("MyDB");
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<dataConfiguration defaultDatabase="MyDB" />
<add name="MyDB" connectionString="Data Source=(local)\SQLEXPRESS;Initial Catalog=MyDB;User ID=sa;Password=mypass"
Aug 15, 2007 01:15 PM|TripleThreat|LINK
Fix this. My App.config is in my Data Objects folder and needed to put the information in my Web.config in my actual application. DLLs get moved over to the bin directory when compiling but config files don't? Go figure...
Oct 11, 2007 08:38 PM|forcedinduction|LINK
I have the same problem. DId you ever find a solution
Nov 11, 2008 07:43 AM|sandeepg|LINK
I think you guys had written the connection string in Inner project like Business layer.. just take the connection string details to the external project app.config or web.config.it will start work....i have the same problem and i resolved in this way.
Thanks & Regards,