T
teser3
For the past year I been using Database insert method where I create
an object in my servlet when inserting into my Oracle 9i database.
The insertData method is using PreparedStatement. My insertData method
has closing statements in finally block. There are about 5 records
input in the database per day.
PeopleServlet:
if(myCondition == 0){
new PeopleInfo().insertData(personObject);
}
I was wondering about using static insertData method instead of
creating object. Please advise what the negatives are for the way I am
doing it compared to using a static method to insert database info.
an object in my servlet when inserting into my Oracle 9i database.
The insertData method is using PreparedStatement. My insertData method
has closing statements in finally block. There are about 5 records
input in the database per day.
PeopleServlet:
if(myCondition == 0){
new PeopleInfo().insertData(personObject);
}
I was wondering about using static insertData method instead of
creating object. Please advise what the negatives are for the way I am
doing it compared to using a static method to insert database info.