× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Sorry, I tried several things but cannot get the column label using Toolbox
to a v5r1 or earlier machine via metadata methods.  It does work to a
server running the release after v5r1 because of enhancements to the
server, but that doesn't do you any good.  One thing that does work is
directly querying the syscolumns table.  I was able to get the label using
      "select COLUMN_HEADING from QSYS2/SYSCOLUMNS WHERE TABLE_NAME
= 'COLUMNS'
      and table_schema = 'DAWJDBC' and COLUMN_NAME = 'P1' "
but I don't know if that is a reasonable option for your case.  My concern
is performance.  Will it be fast enough on a big system with lots of
tables?

David Wall
AS/400 Toolbox for Java




                      "Richards, Etienne
                      (CAP, PTL)"               To:       
"'java400-l@midrange.com'" <java400-l@midrange.com>
                      <Etienne.Richards@        cc:
                      penske.com>               Subject:  RE: JDBC Meta Data
                      Sent by:
                      java400-l-admin@mi
                      drange.com


                      02/13/2002 04:14
                      PM
                      Please respond to
                      java400-l






The table I am looking at has the label and comment set. When I look in
QSYS2/SYSCOLUMNS I can see (And I set it when creating the table).

Using the Toolbox JDBC driver I am not able to see it. Is there something
special that I need to do with Toolbox JDBC driver to return the values?
Which method of the Meta Data will return the text for either one of the
descriptive attributes?

Etienne

-----Original Message-----
From: Richard Dettinger [mailto:cujo@us.ibm.com]
Sent: Wednesday, February 13, 2002 3:06 PM
To: java400-l@midrange.com
Subject: Re: JDBC Meta Data



I'm not an expert on exactly how the internals of this work but here is
what I know about the subject.

There are two ways to give columns names in SQL (which match to some aspect
of DDS that I know nothing about).  Here are two examples;

LABEL ON COLUMN CollectionName.tableName (columnName text is 'descriptive
entry')

COMMENT ON COLUMN CollectionName.tableName (columnName IS 'descriptive
entry')

The Native JDBC driver can only see entries from teh COMMENT ON command.  I
don't know exactly where the LABEL ON entries end up, but they don't get
returned from the database through the CLI.  I believe the Toolbox JDBC
driver can see either one.

Richard D. Dettinger
AS/400 Java Data Access Team

Democracy's enemies have always underestimated the courage of the American
people.
It was true at Concord Bridge.  It was true at Pearl Harbor.  And it was
true today.

         Rochester Post-Bulletin
         Tuesday September 11, 2001


|---------+----------------------------->
|         |           "Richards, Etienne|
|         |           (CAP, PTL)"       |
|         |           <Etienne.Richards@|
|         |           penske.com>       |
|         |           Sent by:          |
|         |           java400-l-admin@mi|
|         |           drange.com        |
|         |                             |
|         |                             |
|         |           02/13/2002 01:51  |
|         |           PM                |
|         |           Please respond to |
|         |           java400-l         |
|         |                             |
|---------+----------------------------->

>
---------------------------------------------------------------------------
-------------------------------------------------|
  |
|
  |       To:       "'java400-l@midrange.com'" <java400-l@midrange.com>
|
  |       cc:
|
  |       Subject:  JDBC Meta Data
|
  |
|
  |
|

>
---------------------------------------------------------------------------
-------------------------------------------------|



All,

We have column labels defined for the columns in a DB/400 table. When
running a query from STRSQL we see the nice long descriptions of the
columns. I have not been able to receive the same information using JDBC
ResultSet MetaData.

Is it possible to retrieve this data?

Etienne Richards
_______________________________________________
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
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.





_______________________________________________
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
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.
_______________________________________________
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
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.







As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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.