Ejemplo n.º 1
0
 public DataTable GetDataBaseInfo(string pSource, string pCatalog, string pUserName, string pPassWord)
 {
     try
     {
         ConnectionSetting.CreateDynamicConnection(pSource, pCatalog, pUserName, pPassWord);
         DataTable result = this.ExeStore("sp_GetDataBaseInfo");
         ConnectionSetting.UseDynamicConnection = false;
         return(result);
     }
     catch (Exception ex)
     {
         LogError.WriteLogError("GetDataBaseInfo: ", ex);
         ConnectionSetting.UseDynamicConnection = false;
         return(new DataTable());
     }
 }
Ejemplo n.º 2
0
 public bool TruncateDataBase(string pSource, string pCatalog, string pUserName, string pPassWord)
 {
     try
     {
         ConnectionSetting.CreateDynamicConnection(pSource, pCatalog, pUserName, pPassWord);
         this.ExeStore("sp_TruncateDataBase");
         ConnectionSetting.UseDynamicConnection = false;
         return(true);
     }
     catch (Exception ex)
     {
         LogError.WriteLogError("TruncateDataBase: ", ex);
         ConnectionSetting.UseDynamicConnection = false;
         return(false);
     }
 }