private static int LastIdentity() throws SQLException
    {
        String statement = "values IDENTITY_VAL_LOCAL()";
        ResultSet rs = getQueryResults(statement);
        int lastid = rs.getInt(1);
        
        return lastid; 
    }