public static void ExecCommand(string command) { try { if (_con != null) { _con.ExecCommand(command); } } catch (Exception ex) { MessageBox.Show("Exception from Semaphore.Infrastructure.Manager.ExecCommand()" + ex.Message); } }
public static void ExecCommand(string command) { try { if (_con != null) { _con.ExecCommand(command); } } catch (Exception ex) { MessageBox.Show("Exception from MyLetterManager.PriorityManager.ExecCommand()" + ex.Message); } }
private void SplitAndExecSubQueries(string query) { try { string[] subQueries = query.Split(';'); foreach (var item in subQueries) { _con.ExecCommand(item); } } catch (Exception ex) { Loger.AddRecordToLog(ex.Message); } }
private static void InsertToDB(OracleConnect con, Record rec, int count) { try { string query = "INSERT INTO SUVD.XML_DATA (ID, PROJECT_ID, ID_IN_XML, BLOCK_TITLE, BLOCK_NAME, ITEM_TITLE, ITEM_NAME, ITEM_VALUE, NUM)" + " VALUES(XML_SEQUENCE.NEXTVAL, " + rec.ProjectID + ", " + rec.IdInXml + ", '" + rec.BlockName + "', '" + rec.BlockVariableName + "', '" + rec.ItemName + "', '" + rec.ItemVariableName + "', '" + rec.ItemValue + "', '" + rec.Num + "')"; con.ExecCommand(query); } catch (Exception ex) { Console.WriteLine(ex.TargetSite + "\n" + ex.Message); FileHandler.WriteToFile(ex.TargetSite + "\n" + ex.Message); } }
private static void TruncateTable() { string query = GetQuery(3); // "truncate table let_app"; _con.ExecCommand(query); }