Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 515479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:37:56+00:00 2026-05-13T07:37:56+00:00

This current project I’ve been assigned uses the Version 3.1 levels of: Microsoft.Practices.EnterpriseLibrary.Common; Microsoft.Practices.EnterpriseLibrary.Data;

  • 0

This current project I’ve been assigned uses the Version 3.1 levels of:

Microsoft.Practices.EnterpriseLibrary.Common;
Microsoft.Practices.EnterpriseLibrary.Data;

As I try to get to know more about the capabilities of the Ent Lib, I am running into lots of articles and doc about various versions (3.1, 4.0, and 5.0 I think).

In general do the newer versions work with application code written for an earlier release of the Ent Lib? I haven’t surveyed all of the source code in this app I’ve inherited but I think only the “basics” of the Data Access Application Block are being used. Here is a typical piece of code:

        public override List<Erx.Action> GetAll(bool bIsActive)
    {
        Database db = null;
        DbCommand cmd = null;
        List<Erx.Action> lst = null;
        IDataReader iRdr = null;
        try
        {
            db = DatabaseFactory.CreateDatabase();
            cmd = db.GetStoredProcCommand("Mst_GetAllCorrectiveAction");
            db.AddInParameter(cmd, "@CorrectiveActionID", DbType.Int32, -1);
            db.AddInParameter(cmd, "@IsActive", DbType.Boolean, bIsActive);
            iRdr = db.ExecuteReader(cmd);

            lst = new List<Erx.Action>();

            while (iRdr.Read())
            {
                Action objAction = new Action();
                objAction.CorrectiveAction = iRdr["CorrectiveAction"].ToString();
                objAction.CorrectiveActionID = int.Parse(iRdr["CorrectiveActionID"].ToString());
                objAction.IsActive = (bool)iRdr["IsActive"];
                lst.Add(objAction);
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally
        {
            db = null;
            iRdr.Close();
            if (cmd != null)
            {
                cmd.Dispose(); cmd = null;
            }
        }
        return lst;
    }

Frankly, this does not seem to offer much beyond regular ADO.Net but maybe the newer versions make things simpler (I’ve heard some very good stuff about Unity).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:37:57+00:00Added an answer on May 13, 2026 at 7:37 am

    I just installed Ent Lib 4.1 and dug closely into the doc and found this in the “Introduction to the Data Access Application Block”:

    Changed Features, Version 3.1 and Later

    In general, applications built using earlier releases of the Data Access Application Block will function with this release without the need for any code changes. It may be necessary to update the references to refer to the new assemblies and to update the configuration files to reference the correct version of the assemblies. However, some changes were made to the Data Access Application Block in version 3.1 (May 2007), which may affect applications written for earlier versions if you upgrade to the current version of Enterprise Library. The following sections describe these changes.

    The .NET Framework 2.0 TransactionScope Class
    To take advantage of the .NET Framework 2.0 TransactionScope class, there have been changes to some of the Database class methods in version of Enterprise Library from version 3.1 onwards. These methods, such as ExecuteNonQuery, have been modified to recognize when a TransactionScope instance is active by replacing the GetConnection method with the GetOpenConnection method. If you have written a class that inherits from the Database class, you will need to rewrite your code to take these changes into account. If you continue to use the GetConnection method, you will receive a compiler warning. In addition, if your application uses the ExecuteXmlReader method, you may need to rewrite your code to test to see whether a TransactionScope instance is active before closing a connection.
    For more information, see Using the TransactionScope Class. For an example of how to use the ExecuteXMLReader method, see Retrieving Multiple Rows As XML.

    strong text
    SQL Server Compact Edition
    Enterprise Library 3.1 – May 2007 and later supports SQL Server Compact Edition (CE). SQL Server CE provides the essential features of a relational database and is intended for desktop and mobile applications that need a local data store but do not require the full functionality of SQL Server. For more information, see the section “Using SQL Server CE” in Creating a Database Object.

    I am still trying to get a sense of how truly useful this DAAB is. It seems like a tremendous amount of reading of doc is required to end up writing just a little less code than otherwise required with ADO.NET un-aided by the DAAB. I guess if one wanted to provide for an easier switch to say, Oracle [from MS SQL Server), this is a useful way to configure things.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The current project I’m working on uses an Oracle DBMS to store data. During
this is for a small project of mine, I'm trying to set the current
Like this: Cursor.Current = Cursors.WaitCursor; try { . . . } finally { Cursor.Current
I've come across this scenario a few times in working on a current project.
This is my current project structure: pom.xml /src /main /resources hibernate.cfg.xml /META-INF persistence.xml I
This is specific to my current project. But maybe the answers will reveal some
I'm planing / designing my database for my current project (Java). For this project
My current project is in rails 2.3.5 which uses restful authentication. I am moving
In my current project there is a Form class which looks like this: public
I need to create high quality icons for my current project in vb.net This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.