Raw SQL on error/exception i v3.0

From: Andreas Pardeike (a..sys.se)
Date: Thu May 14 2009 - 08:09:13 EDT

  • Next message: Mike Kienenberger: "Re: Raw SQL on error/exception i v3.0"

    Hi,

    our backend database sometimes has strange hickups and the admin
    kills some of my sql jobs there because they take too much cpu
    cycles.

    They now ask me what the raw sql statement was (together with which
    values were submitted to each '?' in the query) and I cannot easily
    answer the question.

    So my question: I have a mix of SQLQuery and SQLTemplate. If I get
    an exception on a query (in my case a CayenneRuntimeException:
    Query exception of type "SQLException: The connection does not exist),
    how do I get the latest sql statement?

    I found http://www.nabble.com/Auditing-SQL-queries-td21944833.html
    but am having a hard time to implement the suggestion.

    Any help appreciated,
    Andreas Pardeike



    This archive was generated by hypermail 2.0.0 : Thu May 14 2009 - 08:09:55 EDT