Hi,
i am using the following code in the datalayer. The input paramters are the stored procedure and the associated parameters provided as a HastTable. I am using Enterprise Library, Data Access Block.
--------------

namespace EPD.Data
{
    public class DBManager
    {  
            
        static Microsoft.Practices.EnterpriseLibrary.Data.Database dataBase;     
        static DbCommand oDbCommand;     
              
        public static CommandResult ExecForScalar(string procName, Hashtable paramValCol)
        {           
             
            CommandResult cmdResult;
            try
            {
                dataBase = Microsoft.Practices.EnterpriseLibrary.Data.DatabaseFactory.CreateDatabase();
                CommonManager.PrepareCommand(ref dataBase, ref oDbCommand, procName, paramValCol);
                cmdResult = CommonManager.BuildResult(dataBase.ExecuteScalar(oDbCommand), 
                    (int)Constant.ResultType.Scalar);

            }
            catch (SqlException ex)
            {
                cmdResult = CommonManager.BuildResult(ex);
            }
            catch (Exception ex)
            {
                cmdResult = CommonManager.BuildResult(ex, (int)ExceptionHandler.ErrorCode.NonSQL);
            }
            return cmdResult;
        }
}  }

--------------------------------------------------

I invoke the method from the business layer as follows: CommandResult result = EPD.Data.DBManager.ExecForScalar("proc", hash table containing the parameters); Question:
since the basic method is static and need to know if it affects the concurrent users.

That's a good question. I wonder... given that it would run on different sessions how that would affect anything.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.