× 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.



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.

This thread ...

Replies:

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.