Ejemplo n.º 1
0
 private static void efIngresConnection_CommandModified(object sender, EFIngresCommandEventArgs e)
 {
     Log("MODIFIED SQL");
     Log("{0}", e.Command.CommandText);
     if (e.Command.Parameters.Count > 0)
     {
         Log();
         Log("  Parameters:");
         foreach (DbParameter param in e.Command.Parameters)
         {
             Log("    {0} = {1}", param.ParameterName, QuoteValue(param.Value));
         }
     }
     Log();
 }
Ejemplo n.º 2
0
        private static void efIngresConnection_CommandExecuted(object sender, EFIngresCommandEventArgs e)
        {
            var stopwatch = ((Stopwatch)e.Info);

            stopwatch.Stop();
            Log("  Elapsed: {0}", stopwatch.Elapsed);
            Log("  Result: {0}", e.Result);
            if (!e.Success)
            {
                Log();
                Log("  Statement failed!");
                foreach (var line in e.Error.Message.Split(new string[] { Environment.NewLine }, StringSplitOptions.None))
                {
                    Log("    {0}", line);
                }
            }
            Log(new string('-', 100));
        }
Ejemplo n.º 3
0
        private static void efIngresConnection_CommandStarted(object sender, EFIngresCommandEventArgs e)
        {
            var stopwatch = new Stopwatch();

            stopwatch.Start();
            e.Info = stopwatch;
            Log(new string('-', 100));
            Log("SQL");
            Log("{0}", e.Command.CommandText);
            if (e.Command.Parameters.Count > 0)
            {
                Log();
                Log("  Parameters:");
                foreach (DbParameter param in e.Command.Parameters)
                {
                    Log("    {0} = {1}", param.ParameterName, QuoteValue(param.Value));
                }
            }
            Log();
        }