Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM ODBC Driver » View Thread |
Messages 1 to 4 of 4 total |
Error selecting data using ODBC |
Wed, Jul 8 2009 9:43 PM | Permanent Link |
Matt Collins | I am testing the ODBC driver as a possible solution for a project, but I am receiving errors. Here is the snippet of Java code I am using and the
errors being returned: ------------------------------------------- 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 = "jdbcbc: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"); } ------------------------------------------- The error being thrown is from the "getString" command on the result set: ------------------------------------------- Exception: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958) at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115) at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3908) at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:5702) at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:356)0 at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:413) at ExecExtApp.main(ExecExtApp.java:53) ------------------------------------------- There are also two error windows displayed: ------------------------------------------- (1) "The exception unknown software exception (0x0eedfade) occurred in the application at location 0x7c812a5b." (2) "Runtime error 217 at 0006CBCA" ------------------------------------------- Any help would be greatly appreciated. |
Thu, Jul 9 2009 11:12 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matt,
<< I am testing the ODBC driver as a possible solution for a project, but I am receiving errors. Here is the snippet of Java code I am using and the errors being returned: >> Hmm, that's a driver manager error, which actually occurs above the DBISAM ODBC Driver and kicks in when the call is invalid due to invalid parameters or execution state (this case). Could you send me the table that you're using ? I can try executing it here and see what I can find. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Jul 13 2009 1:13 PM | Permanent Link |
Matt Collins | Tim,
Do you have an email address I can send it to? Thanks. |
Mon, Jul 13 2009 3:23 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matt,
<< Do you have an email address I can send it to? >> Sure, just send it to support@elevatesoft.com or timyoung@elevatesoft.com -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Thursday, April 18, 2024 at 10:42 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |