private static void PrintEventArgs(OracleRowUpdatingEventArgs args) { Console.WriteLine("OnRowUpdating"); Console.WriteLine(" event args: (" + " command=" + args.Command + " commandType=" + args.StatementType + " status=" + args.Status + ")"); }
private void ObjDataAdapter_RowUpdating(object sender, OracleRowUpdatingEventArgs e) { if (e.Command != null) { Console.WriteLine("nRow Updating…--------------------------"); Console.WriteLine(e.Command); Console.WriteLine("Command type: =" + e.StatementType); Console.WriteLine("Command text: =" + e.Command.CommandText); Console.WriteLine("\nParameters:"); foreach (OracleParameter p in e.Command.Parameters) { Console.WriteLine("parameter name = " + p.ParameterName); Console.WriteLine("parameter value = " + p.Value); } Console.WriteLine("nRow Updating…------------end debug--------------"); } }
private void oleDBda_RowUpdating(object sender, OracleRowUpdatingEventArgs e) { Exception exp = null; switch (e.StatementType) { case StatementType.Insert: try { BeginCase("RowInsert"); Compare(drInsert, e.Row); } catch (Exception ex) { exp = ex; } finally { EndCase(exp); exp = null; } EventCounter++; break; case StatementType.Delete: try { BeginCase("RowDelete"); Compare(drDelete, e.Row); } catch (Exception ex) { exp = ex; } finally { EndCase(exp); exp = null; } EventCounter++; break; case StatementType.Update: try { BeginCase("RowUpdate"); Compare(drUpdate, e.Row); } catch (Exception ex) { exp = ex; } finally { EndCase(exp); exp = null; } EventCounter++; break; } }
/// <summary> /// Handles the RowUpdating event /// </summary> /// <param name="obj">The object that published the event</param> /// <param name="e">The OracleRowUpdatingEventArgs</param> protected void RowUpdating(object obj, OracleRowUpdatingEventArgs e) { base.RowUpdating(obj, e); }
// <Snippet1> // handler for RowUpdating event private static void OnRowUpdating(object sender, OracleRowUpdatingEventArgs e) { PrintEventArgs(e); }
/// <summary> /// Handles the RowUpdating event /// </summary> /// <param name="obj">The object that published the event</param> /// <param name="e">The OracleRowUpdatingEventArgs</param> protected void RowUpdating(object obj, OracleRowUpdatingEventArgs e) { base.RowUpdating(obj, e); }