On 4/5/13 5:32 PM, Scott Klement wrote:
Connection properties would be set as part of the call the
JDBC_ConnProp(). Are you using that? The code would look something
like this:

propList = JDBC_Properties();
JDBC_setProp(propList: 'user': %trim(Your-UserId));
JDBC_setProp(propList: 'password': %trim(Your-Password));
JDBC_setProp(propList: 'extended metadata': 'true');

conn = JDBC_ConnProp( 'com.ibm.as400.access.AS400JDBCDriver'
: 'jdbc:as400://localhost'
: propList );

JDBC_freeProp(propList);

Dear Scott, et al:

That's exactly what I have in my RPG test-bed:
prop = JDBC_Properties();
JDBC_setProp(prop: 'user' : <censored>);
JDBC_setProp(prop: 'password': <censored>);
JDBC_setProp(prop: 'DatabaseName': %trim(' '));
// 'sql' naming looks like library.table
// 'system' naming looks like library/table
JDBC_setProp(prop: 'naming' : 'system');
JDBC_setProp(prop: 'extended metadata': 'true');

conn = JDBC_ConnProp('com.ibm.as400.access.AS400JDBCDriver'
: 'jdbc:as400://192.168.1.100'
: prop );
JDBC_freeProp(prop);

And in my Java test bed, I tried both:
static final String DB_URL = "jdbc:as400://192.168.1.100";
Properties prop = new Properties();
prop.setProperty("user", USER);
prop.setProperty("password", PASS);
prop.setProperty("DatabaseName", "");
prop.setProperty("naming", "system");
prop.setProperty("extended metadata", "true");
conn = DriverManager.getConnection(DB_URL,prop);
and:
static final String DB_URL = "jdbc:as400://192.168.1.100;extended metadata=true";
conn = DriverManager.getConnection(DB_URL, USER, PASS);

The most frustrating part is that in the Java test-bed, I think I was able to get getTableName() to work on my MySQL test server even without setting any kind of "extended metadata" property.

Could it somehow be the space between "extended" and "metadata" that it isn't liking?

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.