public static SqlCommand CrearComandoSPPRO(string as_storeProc) { string cadenaConexion = ConexionCPRO.CadenaConexion(); SqlConnection _conn = new SqlConnection(cadenaConexion); SqlCommand _comando = new SqlCommand(as_storeProc, _conn); _comando.CommandType = CommandType.StoredProcedure; return(_comando); }
public static SqlCommand CrearComandoPRO() { string cadenaConexion = ConexionCPRO.CadenaConexion(); SqlConnection _conn = new SqlConnection(cadenaConexion); _conn.ConnectionString = cadenaConexion; SqlCommand _comando = new SqlCommand(); _comando = _conn.CreateCommand(); _comando.CommandType = CommandType.Text; return(_comando); }