Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Enterprise Library Data Block.

Reply
Thread Tools

Enterprise Library Data Block.

 
 
shapper
Guest
Posts: n/a
 
      06-25-2007
Hello,

I created a code to access to a database using Enterprise Library Data
Block:
Dim dbUser As Database = DatabaseFactory.CreateDatabase("MyDB")

When I run my I get the following error:
'System.Configuration.ConfigurationErrorsException : The requested
database MyDB is not defined in configuration.

Could someone tell me what am I missing here?

Thanks,
Miguel

 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      06-25-2007
A setting in the web.config file that defines the database. The CHM file
(help file) for the block has info on how to set up the web.config. NOTE
that the guidance package (Enterprise Library Block Factory project type)
should create these entries for you. I would try creating a new project from
the block factory project type and copying over to your website.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
"shapper" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hello,
>
> I created a code to access to a database using Enterprise Library Data
> Block:
> Dim dbUser As Database = DatabaseFactory.CreateDatabase("MyDB")
>
> When I run my I get the following error:
> 'System.Configuration.ConfigurationErrorsException : The requested
> database MyDB is not defined in configuration.
>
> Could someone tell me what am I missing here?
>
> Thanks,
> Miguel
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enterprise Library - Class Library Greif. =?Utf-8?B?QUo=?= ASP .Net 7 12-06-2007 09:33 AM
Enterprise Library Data Block jw56578@gmail.com ASP .Net 0 05-31-2005 03:47 PM
enterprise application versus enterprise system jrefactors@hotmail.com C++ 2 01-20-2005 01:32 PM
enterprise application versus enterprise system jrefactors@hotmail.com Java 3 01-20-2005 01:32 PM
enterprise application vs. enterprise system jrefactors@hotmail.com Java 3 01-15-2005 07:12 AM



Advertisments