Code example for Connection

Methods: createStatement

0
        super.initializeDatabase(); 
         
        //figure out the 4326 native srid 
        Connection cx = getConnection();
        try { 
            Statement st = cx.createStatement();
            try { 
                ResultSet rs = st.executeQuery("SELECT srid FROM sysspatial.spatial_ref_sys " 
                    + "WHERE auth_srid = 4326"); 
                rs.next();
                srid4326 = rs.getInt(1);
                rs.close();
            } 
            finally { 
                st.close();
            } 
        } 
        finally { 
            cx.close();
        } 
Experience pair programming with AI  Get Codota for Java