[Zope-DB] How to view a dynamically generated ZSQL query

Jorge O. Martinez jmartinez@eMediaMillWorks.com
Tue, 16 Apr 2002 14:34:54 -0400

Thanks Charlie!

<dtml-var REQUEST> is what I needed to display the VARS. Now I hope 
someone knows a trick to display the query in the ZSQL method being 
executed (whether it executes or fails).


Jorge M.

Charlie Reiman wrote:
> Help in reverse order.
> Dumping the HTTP vars is easy. Create a dtml document with <dtml-var
> REQUEST>. REQUEST has everything on it, and it will pretty print and show
> you everything you can get from it.
> Showing a ZSQL query is something I'd like to be able to do. The best I've
> found is to drop into the debugger before I make the call, then step into
> the call. But I'm making my ZSQL queries from python, so that's pretty easy
> for me. If someone knows a better method, please share!
>>-----Original Message-----
>>From: zope-db-admin@zope.org [mailto:zope-db-admin@zope.org]On Behalf Of
>>Jorge O. Martinez
>>Sent: Tuesday, April 16, 2002 10:44 AM
>>Cc: zope-db@zope.org
>>Subject: [Zope-DB] How to view a dynamically generated ZSQL query
>>I am working on a page that will return certain values based on a var
>>that is input through a drop-down menu in a form. I have a ZSQL method
>>that works with other ways of passing values (as foo.html?id=bar for
>>example), but I am attempting to pass a value through a drop down with
>>no luck.
>>I am getting a message that says:
>>Error Type: DatabaseError
>>Error Value: (933, 'ORA-00933: SQL command not properly ended')
>>So my question is this: Is there a dtml method (or Ptyhon script) to
>>display the sql that is being dynamically generated and passed to the
>>ZSQL method? (for debugging). I'd like to see what is the sql that zope
>>is trying to run, but can't see it.
>>Also, while I am on the topic, is there a dmtl method, or python script
>>that will dump all the HTTP vars. For those familiar with PHP the
>>equivalent to 'var_dump($HTTP_POST_VARS)' would be nice. That'd help in
>>debugging a lot. Sorry if this is basic stuff, but I am new to
>>Jorge M.
>>Jorge O. Martinez
>>MIS Senior Associate
>>1100 Mercantile Lane, Suite 119
>>Largo, MD 20774
>>E-mail  => jmartinez@eMediaMillWorks.com
>>Phone   => (301)883-2482 ext. 105
>>Fax     => (301)883-9754
>>Zope-DB mailing list

Jorge O. Martinez
MIS Senior Associate
1100 Mercantile Lane, Suite 119
Largo, MD 20774
E-mail  => jmartinez@eMediaMillWorks.com
Phone   => (301)883-2482 ext. 105
Fax     => (301)883-9754