[Opensource] Quotes in DBObject

Michael Rimov rimovm at centercomp.com
Thu Dec 5 11:18:43 PST 2002


At 10:09 PM 12/4/2002 -0600, you wrote:

>I am calling the find() method from DBObject and it is raising an exception:
>
>com.jcorporate.expresso.core.db.DBException: Unable to execute statement:
>
>Unable to execute statement: SELECT * from tableA WHERE colA = 'Mac\'s' 
>(com.expresspeg.dbobject.Issue, db/context 
>'default'):[interclient][interbase] Dynamic SQL Error
>SQL error code = -104
>
>The \' embedded in my string is causing problems for my JDBC driver.  I 
>believe the \' should simply be two single quotes ''.  Is this behavior 
>customizable via the configuration file or elsewhere?

Hi Aime,

Yes... you want to add an entry for 'DoubleQuoteEscapeHandler'.... it 
should be in the Interbase notes now.  But basically, you want to add an 
escape handler entry in the jdbc config, and set it to:

com.jcorporate.expresso.core.db.DoubleQuoteEscapeHandler

That should do it!
                                                         -Mike





More information about the Opensource mailing list