예제 #1
0
        public static SqlCommand CrearComandoSPCRH(string as_storeProc)
        {
            string        cadenaConexion = ConexionCRH.CadenaConexion();
            SqlConnection _conn          = new SqlConnection(cadenaConexion);
            SqlCommand    _comando       = new SqlCommand(as_storeProc, _conn);

            _comando.CommandType = CommandType.StoredProcedure;
            return(_comando);
        }
예제 #2
0
        public static SqlCommand CrearComandoCRH()
        {
            string        cadenaConexion = ConexionCRH.CadenaConexion();
            SqlConnection _conn          = new SqlConnection(cadenaConexion);

            _conn.ConnectionString = cadenaConexion;
            SqlCommand _comando = new SqlCommand();

            _comando             = _conn.CreateCommand();
            _comando.CommandType = CommandType.Text;
            return(_comando);
        }