| | |
Static methods in DataLayer
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2009
Posts: 2
Reputation:
Solved Threads: 0
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.
--------------
--------------------------------------------------
I invoke the method from the business layer as follows:
Question:
since the basic method is static and need to know if it affects the concurrent users.
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.
--------------
asp.net Syntax (Toggle Plain Text)
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.
Last edited by peter_budo; Jan 11th, 2009 at 2:47 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: Getting type information using xsd
- Next Thread: How to Create Excel File(.xls) from VB.Net App
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox class click commonfunctions compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datagridviewcheckbox datalist deadlock deployment development dgv dropdownlist dropdownmenu dynamic edit embeddingactivexcontrol expose findcontrol flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery list login menu microsoft mono mssql multistepregistration nameisnotdeclared numerical objects order panelmasterpagebuttoncontrols problem ratings rotatepage save schoolproject search security serializesmo.table silverlight smartcard sql sqlserver2005 ssl suse textbox tracking unauthorized validation vb.net video virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment webservice wizard xml youareanotmemberofthedebuggerusers





