I have a method to close the connection in SQLServer2000 with java, but it returns to me an exception.
The problem is when I close the connection
here is the code:
private Connection cn;
private Statement st;
private ResultSet rs;
.....
...
protected int closeT(){
v=1;
try
{ if(rs!=null)rs.close();
cn.close();st.close();}
catch (Exception e){
System.out.println(" 'Database' method: 'CloseT' message: " + e.getMessage());
v=0;
}
return v;
}
and this is the exception
'DataBase' method: 'CloseT' message: [Microsoft][ODBC SQL Server Driver]Not valid State of transaction
thanks