public SqlDataReader GetCustomPub(string mpid)
{
SessionManagement sm = new SessionManagement();
string connstr = ConfigurationManager.ConnectionStrings["ProfilesDB"].ConnectionString;
SqlConnection dbconnection = new SqlConnection(connstr);
SqlDataReader reader;
SqlParameter[] param = null;
try
{
dbconnection.Open();
//For Output Parameters you need to pass a connection object to the framework so you can close it before reading the output params value.
reader = GetDBCommand(dbconnection, "exec [Profile.Data].[Publication.MyPub.GetPublication] '" + mpid.ToString() + "'", CommandType.Text, CommandBehavior.CloseConnection, param).ExecuteReader();
}
catch (Exception e)
{
Framework.Utilities.DebugLogging.Log(e.Message + e.StackTrace);
throw new Exception(e.Message);
}
return reader;
}