Is there a way to view the SQL code that is being generated by ObjectSight?
Yes. Besides the method trace, there is also a built in SQL trace that will trace all SQL commands sent to the server (SELECTs, UPDATEs, INSERTs, DELETEs, COMMITs and ROLLBACKs). In addition, if there is any error with the SQL code during execution, a file called SQLDump.Txt is generated and populated with the offending SQL code and the names and values of any parameters used within the query. A single Tquery component is defined in the TosDatabase component to execute all SQL generated by the Business Objects. This Tquery can be referenced by the property WorkerQuery of the TosDatabase component to interpret the SQL code. Be aware that the SQL property is flushed as each Business Object needs the Tquery to perform SQL operations on the database. To access the trace at runtime, implement some code to open the trace window using the TosDatabase.OpenTraceWindow method. Traces will be saved to txt files when the database disconnects.
Related Questions
- Its great that the application automatically adds some SQL code but is it possible to see exactly what the SQL injection string would be like before sending it?
- XMLSpy® 2010 automatically formats my code if I switch to another view or save the file. How can I disable this?
- Is there a way to view the SQL code that is being generated by ObjectSight?