James
I see that there seems to be based-on information in the file description of a view.
But there is none of that in SYSVIEWS, nor in QADBXREF, the table named in the view, SYSVIEWS.
So it seems only the DSPFD kind of thing will get this information. As Chuck said, write a UDF or UDTF even.
HTH
Vern
----- Original Message -----
From: James H. H. Lampert <jamesl@xxxxxxxxxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Sent: Fri, 05 Apr 2013 18:01:52 -0400 (EDT)
Subject: What's up with this?!? Re: Another JDBC (and by extension, JDBCR4) meta-data retrieval question
I just ran a test on a ResultSetMetaData object.
First, I exposed the JDBC ResultSetMetaData.getSchemaName() and
getTableName() methods in my copy of JDBCR4 -- after the last couple of
methods I had to expose, these are TINKERTOYS!
They returned nothing!
So then I brought up Eclipse, and called them from Java:
for (int i=1; i <= rsmd.getColumnCount(); i++)
System.out.println(rsmd.getColumnName(i) + " "
+ rsmd.getColumnLabel(i)+ "|"
+ rsmd.getSchemaName(i)+ "|" + rsmd.getTableName(i));
STILL NOTHING:
CUNMBR CUNMBR||
CUSORT CUSORT||
CUNAME CUNAME||
CUADD1 CUADD1||
CUADD2 CUADD2||
. . .
What's up with that?!?
A Google search on "ResultSetMetaData.getTableName() returns nothing"
gave me results that indicate that apparently, these methods are
suffering from poor or nonexistent implementations in A LOT of JDBC drivers.
Which brings me back to the question of how to find a view's based-on
table(s), in a way that's pure JDBC, and DBMS-neutral.
--
JHHL
As an Amazon Associate we earn from qualifying purchases.