ChrisRoper
Programmer
Hi
We have an application that takes data from an AS/400. The problem we are facing is that the files on the AS/400 are CCSID 65535 - this means data comes back garbled.
Now, by adding the property 'translate binary=true' the problem can be fixed... however, I can only apply this parameter when making connections myself. Code example:
>>
Properties p = new Properties();
p.put("translate binary", "true"
AS400JDBCDriver d = new AS400JDBCDriver();
AS400 o = new AS400(propAS400, propUserID, propPassword);
conn = d.connect(o, p, null);
>>
If I use the Websphere connection pooling (and need to as it is far more efficient), I can't add the parameter. Code example:
>>
Hashtable parms = new Hashtable();
parms.put(Context.INITIAL_CONTEXT_FACTORY, ("com.ibm.websphere.naming.WsnInitialContextFactory");
Context ctx = new InitialContext(parms);
ds = (javax.sql.DataSource) ctx.lookup("jdbc/" +
propDataSource);
connection = ds.getConnection(propUserID, propPassword);
>>
I've tried all sorts of things but without any luck. All suggestions welcome!
We have an application that takes data from an AS/400. The problem we are facing is that the files on the AS/400 are CCSID 65535 - this means data comes back garbled.
Now, by adding the property 'translate binary=true' the problem can be fixed... however, I can only apply this parameter when making connections myself. Code example:
>>
Properties p = new Properties();
p.put("translate binary", "true"
AS400JDBCDriver d = new AS400JDBCDriver();
AS400 o = new AS400(propAS400, propUserID, propPassword);
conn = d.connect(o, p, null);
>>
If I use the Websphere connection pooling (and need to as it is far more efficient), I can't add the parameter. Code example:
>>
Hashtable parms = new Hashtable();
parms.put(Context.INITIAL_CONTEXT_FACTORY, ("com.ibm.websphere.naming.WsnInitialContextFactory");
Context ctx = new InitialContext(parms);
ds = (javax.sql.DataSource) ctx.lookup("jdbc/" +
propDataSource);
connection = ds.getConnection(propUserID, propPassword);
>>
I've tried all sorts of things but without any luck. All suggestions welcome!