Page 1 of 1

How do I trace SQL generated from Entity Framework?

Posted: Wed 24 Sep 2008 14:54
by markaw
Hi,

Is there a way to trace the SQL Statements generated from Entity Framwork? Especially the failed ones like this:

failed: System.Data.UpdateException : An error occurred while updating the entries. See the InnerException for details.
----> CoreLab.Oracle.OracleException : ORA-06550: Zeile 5, Spalte 448:
PL/SQL: ORA-01747: Ungültige Angabe für benutzer.tabelle.spalte, tabelle.spalte oder spalte
ORA-06550: Zeile 5, Spalte 1:
PL/SQL: SQL Statement ignored

Best regards,
Mak

Posted: Thu 25 Sep 2008 15:01
by Shalex
You can use the Call Stack and Locals windows in Debug mode for tracing the exception.
For this check the Common Language Runtime checkbox (Debug->Exceptions...) and uncheck the Enable Just My Code checkbox (Tools->Options->Debugging).

Alternatively, take advantage of using DBMonitor. Please learn more on how to use it here: http://www.devart.com/dotconnect/oracle/docs/ , section "Using OraDirect .NET", part "Using DBMonitor".