Discussion Locked

changequeryinservletwithoutchangeinsrc

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I want to change the sql query in a servlet without making changes to the source code in
case the database and table structure changes

7 replies

by why

Make the query reference a view rather than base tables. Then if the underlying table design changes, all that needs to be redefined is the view.

by zeshanzia

You can acheive this from the other two answers but please note that it is the query that should be changed. You have a design problem with your project.

This discussion is closed to new replies.