Posted on: 1/28/2015 9:31:58 AM | Views : 529

Hello,
I have a dynamic web form with different fields which are connected to a database (can be either MSSQL or ACCESS db).
Each field's value is calculated using an sql query.
At the moment I'm using different functions to calculate the values since I need to return different types of values (List, Int, data record etc.)
This is how I write the code in each function:
switch (connType) { case "Microsoft Jet": using (System.Data.OleDb.OleDbConnection JETconn = new System.Data.OleDb.OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;" + @"Data source= " + connString)) { try { JETconn.Open(); using (OleDbCommand recStrQueryCommand = new Ole ...

Go to the complete details ...