May 03, 2006, 12:12 PM
Ginnyshow SQL on HTML page
I have a procedure that is not pulling back any data. I'm sure it's because the SQl syntax isn't right. What is the command that I can add to my procedure that will make it show the SQL statement on my HTML page along w/the no data 0 lines found?
TIA
May 03, 2006, 12:52 PM
j.grossIf you set &ECHO=ON in your procedure, and output is HTML, the Focus code executed will be included in an HTML comment block, and can be view in the browser via its View Source option.
For SQL passthru, that's all you need.
If you are coding in Focus and the interface is generating the SQL, you also need to turn on tracing, directing it to the 'client' so that it is merged with the Focus messages and finds its way to the generated HTML.
May 03, 2006, 05:08 PM
jimster06Do a search (find) for SQL on this forum - there are several threads that show how to see the SQL code.
HTH
May 03, 2006, 10:24 PM
TexasStingrayIf you want to see the SQL here is how you get it. In the procedure that you are executing add the following lines.
SET TRACEOFF=ALL
SET TRACEON=STMTRACE//CLIENT
SET TRACEON=SQLAGGR//CLIENT
SET TRACEUSER=ON
SET XRETERIVAL=OFF
SQLAGGR is optional and provides additional insite information.