namespace SQL_FOX { /// <summary> /// Summary description for DAL. /// </summary> [Transaction(TransactionOption.RequiresNew)] [ObjectPooling(true,5,10)] public class DAL : ServicedComponent { public DAL() { // // TODO: Add constructor logic here // } public DataSet fetch(string cmd,string[] paramaters) { try { SqlConnection con = new SqlConnection(connection); //string command = "select * from icitem"; SqlCommand cmd1 = new SqlCommand("select * from icitem",con); //cmd1.CommandType = CommandType.StoredProcedure; //cmd.Parameters.Add(new SqlParameter("@search_item", SqlDbType.VarChar)); //cmd.Parameters["@search_item"].Value = search_item; SqlDataAdapter fetching = new SqlDataAdapter(cmd1); con.Open(); DataSet fetch = new DataSet("fetch"); fetching.Fill(fetch, "fetch"); con.Close(); return fetch; } catch (Exception ex) { DataSet fetch = new DataSet("fetch"); string ex1 = ex.ToString(); return fetch; } } } }