Exemple #1
0
 private void SetVarValue(string VarName, string VarValue) {
   try {
     RCData d = new RCData(CI);
     d.ExecuteStoredProc("exec dbo.sp_SetDBVars @VarName, @VarValue",
       new StProcParam[] {
         new StProcParam("@VarName", DbType.String, VarName), 
         new StProcParam("@VarValue", DbType.String, VarValue)
       }
     );        
   } catch { }
 }
Exemple #2
0
    private string GetVarValue( string VarName) {
      string result = "";
      try {
        
        RCData d = new RCData(CI);
        DataSet ds = d.GetStProcDataSet( "SELECT dv_VarValue, dv_VarName FROM DBVars WHERE VarName = @VarName ",
          new StProcParam[] {
            new StProcParam("@VarName", DbType.String, VarName)
          });

        if ((ds.Tables.Count > 0) & (ds.Tables[0].Rows.Count > 0)) {
          try { result = Convert.ToString(ds.Tables[0].Rows[0]["dv_VarValue"]); } catch { result = ""; }
        }       
        
      } catch { }
      return result;
    }