Code example for Connection

Methods: closeprepareStatement

0
				                           "VALUES ( ?,?,?,? )"; 
		 
		try { 
			 
			currentCon = ConnectionManager.getConnection();
			stmt = currentCon.prepareStatement(searchQuery);
			 
			stmt = currentCon.prepareStatement(searchQuery);
			stmt.setLong(1, currentSessionUser.getId() );
			stmt.setLong(2, other_user_id );
			stmt.setLong(3, conversation_id );
			stmt.setString(4, content );
			 
			stmt.executeUpdate();
			 
		}catch (Exception ex) {
		     System.err.println(ex);
		     exito = false;
		}  
	     
		  //some exception handling 
		finally { 
		     if (rs != null)	{
		        try { 
		           rs.close();
		        } catch (Exception e) { System.err.println(e); }
		           rs = null;
		        } 
		 
		     if (stmt != null) {
		        try { 
		           stmt.close();
		        } catch (Exception e) { System.err.println(e); }
		           stmt = null;
		        } 
		 
		     if (currentCon != null) {
		        try { 
		           currentCon.close();
		        } catch (Exception e) { System.err.println(e); }
		 
		        currentCon = null;
		     } 
		} 
Connect your IDE to all the code out there  Get Codota for Java