>public DataSet ExecuteQuery(string sCommand, string sTableName, SqlParameter[] colParameters) >{ > SqlCommand oCommand = _GetCommand(sCommand); > SqlConnection oConn = _GetConnection(false); > > if (sTableName == "") > { > sTableName = ""; > } > > if (colParameters != null) > { > oCommand.Parameters.Clear(); > oCommand.Parameters.AddRange(colParameters); > oCommand.CommandType = CommandType.StoredProcedure; > } > > > DataSet oDataSet = new DataSet(); > _oAdapter = new SqlDataAdapter(sCommand, oConn); > > SqlCommandBuilder oBuilder = new SqlCommandBuilder(_oAdapter); > > _oAdapter.SelectCommand = oCommand; > > try > { > _oAdapter.Fill(oDataSet, sTableName); > > } > > return oDataSet; >} > >