Re: JDBC & views
From: John C. Bollinger (jobollin_at_indiana.edu)
Date: 11/24/03
- Next message: Chris Smith: "Re: accessing servlet filters"
- Previous message: David Segall: "Re: Netbeans Vs Eclipse platforms"
- In reply to: Anonymous: "Re: JDBC & views"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 24 Nov 2003 10:38:16 -0500
Anonymous wrote:
> That works great - thanks!!
>
> So question # 2 now is:
>
> Is there a way to have a select applied to a view?
>
> I know how to do it if I am writing the select statement. But what I
> want is a little different. The user can write and select statement
> they wish and I will then apply that statement to either the entire
> database or to a view depending on a setting I have. So the select
> will have nothing about the view in it. (In fact, the user does not
> know the view exists.)
>
> Any ideas?
It seems to me that if the user writes the SELECT statement, then he
determines which table / view he is selecting from. If you want to run
the statement against a programmatically chosen view instead of against
the user specified table(s) then you will have to modify the user's
statements appropriately before submitting them to the DB. You might be
able to (carefully) change the appropriate table names to the
corresponding view names in the statement's FROM clause.
JDBC is just the vehicle for delivering the statements to the DB and
getting the results; it has little to do with how you would implement
this kind of functionality.
John Bollinger
jobollin@indiana.edu
- Next message: Chris Smith: "Re: accessing servlet filters"
- Previous message: David Segall: "Re: Netbeans Vs Eclipse platforms"
- In reply to: Anonymous: "Re: JDBC & views"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|