Enterprise Library Data Block.

Discussion in 'ASP .Net' started by shapper, Jun 25, 2007.

  1. shapper

    shapper Guest

    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
     
    shapper, Jun 25, 2007
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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
    >
     
    Cowboy \(Gregory A. Beamer\), Jun 25, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Showjumper
    Replies:
    1
    Views:
    705
    Showjumper
    Mar 19, 2005
  2. Replies:
    0
    Views:
    407
  3. Jonathan Crawford
    Replies:
    6
    Views:
    2,037
  4. =?Utf-8?B?Sm9u?=

    Enterprise Library Data Block

    =?Utf-8?B?Sm9u?=, Nov 14, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    339
    Cowboy \(Gregory A. Beamer\)
    Nov 14, 2006
  5. shapper
    Replies:
    3
    Views:
    767
    sloan
    Feb 8, 2007
Loading...

Share This Page