Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Incident Reports » Incident Reports Addressed for Version 4.28 » View Incident Report |
Serious |
Reported By: Matt Collins Reported On: 7/8/2009 For: Version 4.28 Build 4 |
ResultSet rs; // Data returned from statement queries. Connection conn = null; // Connection to the database. Statement stmtRS; // Statements to execute the SQL on the database. String url = "jdbc:odbc:CPLocks"; // This is the ODBC datasource setup on the local machine. String resgrp = ""; try { // Connect and login to the database. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); conn = DriverManager.getConnection(url, "Admin", "DBAdmin"); stmtRS = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); rs = stmtRS.executeQuery("SELECT RES_GRP, RES_ID, SEQ_NO, EXCL_LCK, USR_ID FROM Locks"); while(rs.next()) { System.out.println(rs.getRow()); resgrp = rs.getString("RES_GRP"); } Workaround: if (rs.first()) { System.out.println(rs.getRow()); resgrp = rs.getString("RES_GRP"); System.out.println(resgrp); while(rs.next()) { System.out.println(rs.getRow()); resgrp = rs.getString("RES_GRP"); System.out.println(resgrp); } }
This web page was last updated on Tuesday, April 23, 2024 at 08:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |