Where to store SQL statement
- From: jsguru72 <john@xxxxxxxxxx>
- Date: 9 May 2007 17:59:43 -0700
I write a lot of JSP pages with backend classes to access MySQL
databases. One of my biggest problems is having the SQL statements
hardcoded in class.
Everytime I have to make a slight change to the sql statement, I have
to completely recompile the entire class. This is especially
troublesome during testing when I have to update the statements
numerous times until I get it just right.
Where should I be storing the statements?
Should I put them in a text file and read them in when needed? I have
thought of this, but I am concerned about the overhead of opening and
reading a file just to get a SQL statement.
Just trying to find out some ideas.
Thanks.
.
- Follow-Ups:
- Re: Where to store SQL statement
- From: Lulu58e2
- Re: Where to store SQL statement
- From: tzvika.barenholz@xxxxxxxxx
- Re: Where to store SQL statement
- From: Arne Vajhøj
- Re: Where to store SQL statement
- Prev by Date: jdbc connection to database Oracle 10g
- Next by Date: Re: Where to store SQL statement
- Previous by thread: jdbc connection to database Oracle 10g
- Next by thread: Re: Where to store SQL statement
- Index(es):
Relevant Pages
|