sahar sa wrote:Dear friends,
I have a problem with making and closing the connection to my data base.
let me explain, I closed my CONNECTION and PSTMT after insert query but when I run this code after the first round I get the below error :
code:
trigger code:
insert code:
error:
so according to this error I should remove closing conn and pstmt but in all the examples I found they closed them.
Can some one tell me what will happen if i do not close my CONNECTION and PSTMT after insert, delete or select?
thnx,
Sahar.
I executed this above program successfully without any exception. As whenever you are calling the insert method, you are creating a fresh connection object. So if you close connection, it does'nt matter.