|
OK. I'll look forward to getColumnLabel support sometime in the future. Thanx again, PLA -----Original Message----- From: java400-l-admin@midrange.com [mailto:java400-l-admin@midrange.com]On Behalf Of Richard Dettinger Sent: Friday, August 24, 2001 3:51 PM To: java400-l@midrange.com Subject: RE: getColumnLabel of ResultSetMetaData returns only the field name Thers is no getColumnComment method. There is a field in the ResultSet on DatabaseMetaData's getColumns method (I believe the remarks column which is #12 or so) where the comment can be returned. I believe the toolbox JDBC driver will return the label in that field if there is no comment. There would, of course, be a tremendous amount of overhead in trying to get the label through DatabaseMetaData calls for all ResultSetMetaData requests of the label which is why they don't do it. Today, we will never return anything but the column name for getColumnLabel. In the future we expect to be able to as the system opens up extended metadata to us. Regards, Richard D. Dettinger AS/400 Java Data Access Team "Biologists have a special word for stability -- dead" Larry Wall Open Source Developers Journal Issue 1, Jan 2000 "Patrick L Archibald" <Patrick.Archibald@HomeTelco.com>@midrange.com on 08/24/2001 02:38:45 PM Please respond to java400-l@midrange.com Sent by: java400-l-admin@midrange.com To: <java400-l@midrange.com> cc: Subject: RE: getColumnLabel of ResultSetMetaData returns only the field name Thanks for the info Richard! In case you need to know, I am using the native JDBC driver, not the toolbox JDBC driver. I tried the COMMENT function. It is not returned by the getColumnLabel method. I don't see a getColumnComment method documented. How would I retrieve the COMMENT? Not that I'm going to use this, I'll just expect the getColumnLabel to work sometime in the future. I am just curious. Thanx again for quick and concise response, PLA -----Original Message----- From: java400-l-admin@midrange.com [mailto:java400-l-admin@midrange.com]On Behalf Of Richard Dettinger Sent: Friday, August 24, 2001 3:17 PM To: java400-l@midrange.com Subject: Re: getColumnLabel of ResultSetMetaData returns only the field name The iSeries JDBC drivers return the column name today as you have noticed. Sorry. There is some work being done to investigate how hard it would be to make it possible for the drivers to get this information in a future release. For now, I think your only work around is to use the DatabaseMetaData.getColumns API to get the information (it is provided through that interface today). Of note (and this one even I can't explain), the native JDBC driver can't return labels today. It can return comments. The Toolbox JDBC driver (I believe) will return either. Its got something to do with where the data is stored in the database and the different ways the two drivers get at the data. What that means is that the getColumn API for Native JDBC can return info for a column from: COMMENT ON lib.table (COLUMN1 IS 'text') but not this: LABEL ON COLUMN lib.table (COLUMN1 TEXT IS 'text') Again, toolbox seems to work with both. Regards, Richard D. Dettinger AS/400 Java Data Access Team "Biologists have a special word for stability -- dead" Larry Wall Open Source Developers Journal Issue 1, Jan 2000 "Patrick L Archibald" <Patrick.Archibald@HomeTelco.com>@midrange.com on 08/24/2001 01:37:43 PM Please respond to java400-l@midrange.com Sent by: java400-l-admin@midrange.com To: <JAVA400-L@midrange.com> cc: Subject: getColumnLabel of ResultSetMetaData returns only the field name Hi All I can't get the getColumnLabel from a to work like I think it should. After creating the SQL table TRASH/ROOT1 from STRSQL tool, I've done the following: label on column trash/root1 (dircname is 'Directory Name') label on column trash/root1 (dircname text is 'Directory Name') When I use the getColumnLabel from a ResultSetMetaData in my servlet I get just the field name DIRCNAME returned. I'm stumped. Does OS/400 not support this method or? I've searched the newsgroups using google and found many others on different systems having trouble with this. Some said that it only works if you specify the "AS" in the "SELECT" statement. I hope that is not the case. I'm building HTML tables dynamically on any file. I would like to use the column heading or label in the <TH> tags. Specs: OS/400 V4R5M0 620-2175-832MB WAS 3.5.3 JDK 1.2 BTW, have y'all noticed the changes recently to the newsgroup search function at http://www.google.com? Thanx, PLA / / Patrick L Archibald / http://HomeTelco.com/pla/ / _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l or email: JAVA400-L-request@midrange.com _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l or email: JAVA400-L-request@midrange.com _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l or email: JAVA400-L-request@midrange.com _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l or email: JAVA400-L-request@midrange.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.