Escape character question
Escape character question
- Subject: Escape character question
- From: Ismael Perdido <email@hidden>
- Date: Mon, 24 Oct 2005 21:00:47 +0200 (CEST)
Hi all,
I am having trouble sending a 'like' operator query
from WO5.2.3 to Postgresql8 (also installed project
wonder). It apparently bombs on the escape character
being used by default ('\').
Is there a way to modify this character or work around
it WITHOUT having to use the EOAdaptorChannel to send
the SQL directly to the server? Below is the error.
Any advice would be greatly appreciated.
com.webobjects.jdbcadaptor.JDBCAdaptorException:
EvaluateExpression failed:
<com.webobjects.jdbcadaptor.JDBCExpression: "SELECT
t0.address, t0.city, t0.email1, t0.fullname,
t0.grade_id, t0.password, t0.phone1, RTRIM(t0.state),
t0.u_id, t0.zip FROM public.userinfo t0 WHERE
UPPER(t0.fullname) LIKE UPPER(?) ESCAPE '\'"
withBindings: 1:"%o%"(fullname)>:
Next exception:SQL State:42601 -- error code: 0 --
msg: ERROR: unterminated quoted string at or near
"'\'"
at
com.webobjects.jdbcadaptor.JDBCContext._jdbcErrorWithChannel(JDBCContext.java:138)
at
com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression(JDBCChannel.java:310)
at
com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression(JDBCChannel.java:261)
at
com.webobjects.jdbcadaptor.JDBCChannel.selectAttributes(JDBCChannel.java:185)
at
com.webobjects.eoaccess.EODatabaseChannel._selectWithFetchSpecificationEditingContext(EODatabaseChannel.java:879)
at
com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpecification(EODatabaseChannel.java:216)
at
com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3196)
at
com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3337)
at
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:539)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4053)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4438)
at ContactList.setContacts(ContactList.java:33)
at ContactList.searchContacts(ContactList.java:39)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAccessor.java:54)
at
com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1160)
at
com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1268)
at
com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1539)
at
com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:498)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
at
com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1600)
at
com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:46)
at
com.webobjects.appserver._private.WOImageButton.invokeAction(WOImageButton.java:239)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101)
at
com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110)
at
com.webobjects.appserver._private.WOForm.invokeAction(WOForm.java:82)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101)
at
com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110)
at
com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:945)
at
com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1166)
at
com.webobjects.appserver.WOApplication.invokeAction(WOApplication.java:1375)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedPage(WOComponentRequestHandler.java:196)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedSession(WOComponentRequestHandler.java:287)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:322)
at
com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:358)
at
com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:432)
at
com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306)
at
com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173)
at
com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:552)
Kind regards,
Ismael Jones
email@hidden
______________________________________________
Renovamos el Correo Yahoo!
Nuevos servicios, más seguridad
http://correo.yahoo.es
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden