locked
Problem connecting to Database using Enterprise 3.1 RRS feed

  • Question

  • User433556381 posted
    <configuration>

    <configSections>

    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings,

    Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    </configSections>

    <dataConfiguration defaultDatabase="Connection String" />

    <connectionStrings>

    <add name="Connection String" connectionString="Data Source=MyComputerBlock;Initial Catalog=DBAOS;Persist Security Info=True;User ID=sputnik;Password=solaris"

    providerName="System.Data.SqlClient" />

    </connectionStrings>

    </configuration>

     

     

    I keep Getting the following error

    at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseConfigurationView.get_DefaultName() at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseMapper.MapName(String name, IConfigurationSource configSource) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfigurationNameMappingStrategy.BuildUp(IBuilderContext context, Type t, Object existing, String id) at Microsoft.Practices.ObjectBuilder.BuilderBase`1.DoBuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies) at Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies) at Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp[TTypeToBuild](IReadWriteLocator locator, String idToBuild, Object existing, PolicyList[] transientPolicies) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IReadWriteLocator locator, IConfigurationSource configurationSource) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IConfigurationSource configurationSource) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.NameTypeFactoryBase`1.CreateDefault() at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseFactory.CreateDatabase() at Sputnik.Petition.Petition.BrowseOpen() in C:\Sputnik.Petition\Petition.cs:line 272

     

    ANyone know how I can fix this problem please?? Thanks in Advance

    Wednesday, April 9, 2008 9:22 PM

Answers

  • User433556381 posted

    I finally got a fix for it. I was busy referencing the dlls contained in the wrong folder. as soon as I changed the reference source, it worked.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 10, 2008 4:43 PM