JDBCAdaptor LIKE clause problem
JDBCAdaptor LIKE clause problem
- Subject: JDBCAdaptor LIKE clause problem
- From: "Peter Fournier" <email@hidden>
- Date: Sat, 16 Aug 2003 17:26:46 -0400
Ever since I went from 4.5 to 5.2 I have not been able to perform LIKE
searches. At the end of this email you can see my filter going into
EOUtilities.objectsWithQualifierFormat, the SQL the launch window shows as
generated, and the error message I receive in the launch window.
Does anyone have a workaround for this? It appears that the MicroSoftPlugIn
is generating invalid SQL and needs to be replaced, but I have not been able
to locate source code for it.
I am running MS SQL Server 7 and WO 5.2 on Win2k. This all worked fine in
4.5.
Any help appreciated. Thanks,
Pete Fournier
email@hidden
FILTER PUT INTO EOUtilities.objectsWithQualifierFormat ALONG WITH 8 items in
an array
(project = %@) and (owner = %@) and (status = %@ or status = %@ or status =
%@ or status = %@) and ((initialDescription caseinsensitivelike %@) or
(fragments.fragmentMessage caseinsensitivelike %@))
SQL SHOWN GENERATED WHEN SQL DEBUG IS TURNED ON
<com.webobjects.jdbcadaptor.MicrosoftPlugIn$MicrosoftExpression: "SELECT
t0.contributorEmail, t0.contributorID, t0.contributorName, t0.dateClosed,
t0.dateEntered, t0.dueDate, t0.filePathDirectoryFragment,
t0.filePathURLFragment, t0.fixedInBuild, t0.foundInBuild, t0.hoursWorked,
t0.id, t0.initialDescription, t0.number, t0.ownerID, t0.priorityID,
t0.projectID, t0.statusChangedBy, t0.statusID, t0.typeID FROM WorkItem t0,
WorkFragment T1 WHERE ((UPPER(t0.initialDescription) LIKE UPPER(?) ESCAPE
'\' OR UPPER(T1.fragmentMessage) LIKE UPPER(?) ESCAPE '\') AND (t0.statusID
= ? OR t0.statusID = ? OR t0.statusID = ? OR t0.statusID = ?) AND t0.ownerID
= ? AND t0.projectID = ?) AND t0.id *= T1.workID" withBindings:
1:"something"(initialDescription), 2:"something"(fragmentMessage),
3:131(statusID), 4:126(statusID), 5:2(statusID), 6:1(statusID),
7:1(ownerID), 8:6(projectID)>
ERROR MESSAGE RECEIVED IN RUN WINDOW
com.webobjects.jdbcadaptor.JDBCAdaptorException: EvaluateExpression failed:
<com.webobjects.jdbcadaptor.MicrosoftPlugIn$MicrosoftExpression: "SELECT
t0.contributorEmail, t0.contributorID, t0.contributorName, t0.dateClosed,
t0.dateEntered, t0.dueDate, t0.filePathDirectoryFragment,
t0.filePathURLFragment, t0.fixedInBuild, t0.foundInBuild, t0.hoursWorked,
t0.id, t0.initialDescription, t0.number, t0.ownerID, t0.priorityID,
t0.projectID, t0.statusChangedBy, t0.statusID, t0.typeID FROM WorkItem t0,
WorkFragment T1 WHERE ((UPPER(t0.initialDescription) LIKE UPPER(?) ESCAPE
'\' OR UPPER(T1.fragmentMessage) LIKE UPPER(?) ESCAPE '\') AND (t0.statusID
= ? OR t0.statusID = ? OR t0.statusID = ? OR t0.statusID = ?) AND t0.ownerID
= ? AND t0.projectID = ?) AND t0.id *= T1.workID" withBindings:
1:"something"(initialDescription), 2:"something"(fragmentMessage),
3:131(statusID), 4:126(statusID), 5:2(statusID), 6:1(statusID),
7:1(ownerID), 8:6(projectID)>:
Next exception:SQL State:S0002 -- error code: 8116 -- msg: Argument data
type text is invalid for argument 1 of upper function.)
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.