Enterprise Library Data Block.

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

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
 
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!
************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top