Hi all,
pls look at the following code:
I have got one class which will get the connection & process the DRL & DML stmts with oracle DB. (DAO.java).
I am using this class in my
java file to get the connection and execute the queries.
My class is : MyDBTest.java
i am using like this::
String qry1 = "select * from emp";
DAO dao = new DAO();
dao.getRecords(qry1); //this getRecords method internally get the connection and execute the select queries.
and i have to execute one more insert query. can i use the same object to do this ??? like
String insQry = "insert into .....";
dao.executeQuery(insQry);
Is there any harm in using the same object for different operations.
or i have to create one more object of DAO class and use it for insert queries.
pls help me..
thanks & regards,
Mahesh