Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to detect views w/ JDBC?

Re: How to detect views w/ JDBC?

From: Bob Bunch (OCP) <bunchb_at_hotmail.com>
Date: Sun, 17 Apr 2005 23:14:22 -0400
Message-ID: <pan.2005.04.18.03.14.19.828000@hotmail.com>


On Sun, 17 Apr 2005 19:49:10 -0700, Jim Kennedy wrote:

> "Bob Bunch (OCP)" <bunchb_at_hotmail.com> wrote in message
> news:pan.2005.04.18.02.40.46.266000_at_hotmail.com...

>> I'm trying to figure out how to tell if a given table (given "select *
>> from someTableName") using JDBC/Thin is a view. I've tried using
>>
>> ResultSetMetaData.isReadOnly(int column)
>> ResultSetMetaData.isWritable(int column)
>> ResultSetMetaData.isDefinitelyWritable(int column)
>>
>> ...all of which return the same result for a view as a table. Doesn't
>> matter if it's a simple or complex view.
>>
>> I can't employ an Oracle-specific solution for this problem (that'd be
>> WAY to simple ;) - this needs to be DB agnostic (aka pure JDBC).
>>
>> Any ideas?
>>
>> Thanks!
>>
> Run from this point of view.  You are going for the lowest common
> denominator and it is going to bite you in the tender regions.  You are
> only going to enrich the hardware vendor's pockets because you are going
> to implement a very unscalable solution. Jim

Perhaps I should've clarified that this is for a code generator, NOT a to-be-live application. I'm generating classes based on a given schema's tables/views, and need to determine WHAT a given entity is, so I can NOT generate insert/update/delete methods if the entity is a view. Received on Sun Apr 17 2005 - 22:14:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US