示例#1
0
 public static DbDataReader ObtenerDbDataReaderPorProcedure(SqlCommand cmd)
 {
     try
     {
         DbDataReader dr;
         comando                = cmd;
         comando.Connection     = AccesoBD.AbrirConexion();
         comando.CommandType    = CommandType.StoredProcedure;
         comando.CommandTimeout = 1024;
         dr = cmd.ExecuteReader();
         return(dr);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#2
0
 public static DbDataReader ObtenerDatosDbDataAdapter(SqlCommand cmd)
 {
     try
     {
         DbDataReader dr;
         comando                = cmd;
         comando.Connection     = AccesoBD.AbrirConexion();
         comando.CommandType    = CommandType.Text;
         comando.CommandTimeout = 1024;
         dr = cmd.ExecuteReader();
         return(dr);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }