RE: JDBCAdaptor LIKE clause problem
RE: JDBCAdaptor LIKE clause problem
- Subject: RE: JDBCAdaptor LIKE clause problem
- From: "Peter Fournier" <email@hidden>
- Date: Mon, 18 Aug 2003 19:10:18 -0400
Thanks, but I already tried putting single and then double quotes around it.
I also tried using a search word and then a search word with an asterisk as
a wildcard character. Still failed. Also, I tried changing the like
parameter to be a hardcoded string without the %@ and just the search
parameters in the string. With and without quotes. None of these changes
resulted in valid SQL being generated.
Pete
-----Original Message-----
From: email@hidden
[mailto:email@hidden]On Behalf Of Ricardo
Strausz
Sent: Monday, August 18, 2003 2:23 PM
To: Peter Fournier
Cc: Webobjects-Dev
Subject: Re: JDBCAdaptor LIKE clause problem
From the error (and the sql) showed it seems that the object send to
the format is not beeing interpreted (parsed) correctly.
you may try to puth sigle coutes arround...
which wild-card are you using?
On sabado, agos 16, 2003, at 16:26 America/Mexico_City, Peter Fournier
wrote:
> 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.
_______________________________________________
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.
_______________________________________________
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.