Enterprise Library Data Block.

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
 
C

Cowboy \(Gregory A. Beamer\)

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.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top