How Do I View SQL Statements Sent by Magic xpa to the Database? (Magic xpa 3.x)
Although Magic xpa will format SQL statements for you behind the scenes, you can view the actual SQL call in a couple of ways:
We won’t cover the second one here, since it depends on the DBMS. Viewing the SQL statement in Magic xpa is very easy, as you can see below.
-
First, you need to turn on logging. You do this by going to Options->Settings->Logging.
Set the logging level you want for this particular DBMS. None is no logging; Customer has some, Developer has more than that, and Support has the most.
-
None - No log file will be generated
-
Customer - Log only the SQL commands generated
-
Support - Additional information for the developer
-
Developer - A full log to be generated for use by the MSE Technical Support department
Customer logging is sufficient to view the SQL statement sent by Magic xpa, but you can get more information using Developer or Support. This example is an activity log with logging set to Support.
-
Turn on Debug mode if needed, by clicking on Debug->Debug Mode.
-
Open up the Activity Monitor (View->Activity Monitor).
Now, when you run your program in the Debugger, you will see the SQL statements in the Activity monitor.
How Do I Debug My Application Using the Debugger?