Go Back   Velocity Reviews > General Computer Discussion > General Help Related Topics
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply

General Help Related Topics - Problem in Creating Database Through Enterprise Library 2.0

 
Thread Tools Search this Thread
Old 04-14-2009, 11:59 AM   #1
rao.kamran
Junior Member
 
Join Date: May 2007
Posts: 3
Default Problem in Creating Database Through Enterprise Library 2.0

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.
rao.kamran is offline   Reply With Quote
Old 06-22-2009, 02:14 AM   #2
jbuyers
Member
 
Join Date: Jun 2009
Posts: 48
Default

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.
jbuyers is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47