Re: AS400 DB2 access issues
Re: AS400 DB2 access issues
- Subject: Re: AS400 DB2 access issues
- From: Bob Stuart <email@hidden>
- Date: Tue, 24 Feb 2004 21:24:01 -0500
John,
Yes it can work BUT there are a bunch of quirks with the
AS400. You are tripping over the problem that the AS400 does not
allow Upper to be used with a binding. The easy way out is to not
use the caseInsensitive like. If you really need case insensitive
there are some ways to get it but they are messy.
At 4:14 PM -0800 2/22/04, John Gilmore-Baldwin wrote:
I'm trying to get WO to interact with an AS400 database.
My problem is that I'm getting errors trying to retrieve database.
If I run a query that involves a string match and the contents of
the string is all numbers (for example, a zip code), I get an error
like this:
... WHERE UPPER(T1.POZIP5) LIKE UPPER(?) ESCAPE '\'" withBindings:
1:"12345%"(pozip5)>: Next exception:SQL State:42815 -- error code:
-171 -- msg: [SQL0171] Argument 1 of function UPPER not valid.
General string match attempts result in a different error:
Next exception:SQL State:42610 -- error code: -418 -- msg: [SQL0418]
Use of parameter marker not valid.
I'm using the jtopen 4.2 libraries from IBM, and am running v5r2 on
the AS/400.
I read that the issue might be that the data needs to be cast into
the right type, but I don't know how to make that happen within WO,
short of resorting to raw SQL statements.
Is anyone else using WO with an AS/400? Is this surmountable. (I'll
be OK with eliminating the use of UPPER if that's the solution, but
I don't know how to do that either.)
John Gilmore-Baldwin
_______________________________________________
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.
--
Bob Stuart
_______________________________________________
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.