You are not logged in Log in Join
You are here: Home » Members » Zen » Zen's Tips » If your having trouble debugging complex ZSQL methods, you can view the SQL being generated » tip_view

Log in
Name

Password

 

Created by ZopeOrgSite . Last modified 2001-10-11 20:10:16.

This technique is extremly usesful if your ZSQL methods are throwing exceptions like 'ambiguous column' and giving you no clue as to where the error is. Simply create a DTMLMethod like the one below, grab the generated SQL and paste it into another tool that will give you more informative feedback (eg. SQL*Plus)::
  
  
The magic here is the 'src__=1' argument which tells the ZSQL method that we want to view the SQL rather than execute it and return the results.