![]() |
|
|
|||||||
![]() |
General Help Related Topics - Problem in Creating Database Through Enterprise Library 2.0 |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Junior Member
Join Date: May 2007
Posts: 3
|
Hi,
I am having problem in trying to create database from my DataAccessLayer (DAL) using MS Enterprise Blocks 2.0. My application architecture is as follwos 1- MyService (WindowsService) 2- Business Entities Layer 3- Business Logic Layer 4- DataAccessLayer (DAL) My only app.config is in root of my MyService project and setting.settings is in properties folder. When i try to create db i get the error {" The type initializer for 'Microsoft Practices EnterpriseLibrary Common Configuration ObjectBuilder.EnterpriseLibraryFactory' threw an exception "} I have copy pasted the config file and renamed its name spaces properly. I have basically two project with the same architecture. In one project i can interact with database properly. CODE: public void GetOASList(OASLiveToSanboxDataSet dsOAS, string Version) { Database dbDSS = CreateDSSDataBase(); DbProviderFactories.GetFactory("System.Data.SqlCli ent")); DbCommand command = dbDSS.GetStoredProcCommand("spMediaGetOASList"); dbDSS.AddInParameter(command, "bWithAccount", System.Data.DbType.Int32, Convert.ToInt32(0)); dbDSS.AddInParameter(command, "UserID", System.Data.DbType.Int32, Convert.ToInt32(1)); dbDSS.LoadDataSet(command, dsOAS, dsOAS.OASConfigs.TableName); } protected Database CreateDSSDataBase() { return DatabaseFactory.CreateDatabase(); } ---------------------------------------- appConfig ------------ <dataConfiguration defaultDatabase="MyService.Properties.Settings.DSS ConnectionString" /> <connectionStrings> <add name="MyService.Properties.Settings.DSSConnectionS tring" connectionString="Server=CMDLHRDSS01;database=DSS_ Test;user id=test;password=test;" providerName="MyService.Data.SqlClient" /> </connectionStrings> ------------------------------ Thank you in anticipation. |
|
|
|
|
|
#2 |
|
Member
Join Date: Jun 2009
Posts: 48
|
hmmm..
check your firewall or program manager to see if the whole damn thing isn't trying to rock a blocked port. wish I had more to say on this one. ![]() |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: memory stick problem creating folder or file | Joep | A+ Certification | 2 | 07-27-2007 09:05 PM |
| Dial Up Problem | smackedass | A+ Certification | 3 | 02-02-2007 10:59 PM |
| Re: storage problem | SilverSurfer | A+ Certification | 6 | 06-09-2005 06:58 PM |
| Re: Virus Problem ** Help!** | David BlandIII | A+ Certification | 1 | 03-02-2004 05:00 PM |
| Re: Serious Computer Problem | hootnholler | A+ Certification | 1 | 11-24-2003 11:18 AM |