Problem With Jdbc-Odbc BRidge Connection

I get The following error
SQLException:[Microsoft][ODBC Driver Manager] Invalid cursor state
when using the code
whats the problem with it
import java.sql.*;
public class Employee {
String DBurl;
Connection con;
public Employee(String url)
DBurl=url;
void queryTest()
String query="SELECT * FROM EmpTable";
ResultSet result;
Statement stmt;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
catch(java.lang.ClassNotFoundException e){
System.err.println("Class not Found Exception:");
System.err.println(e.getMessage());
try{
con=DriverManager.getConnection(DBurl,"myLogin","mypassword");
stmt=con.createStatement();
result=stmt.executeQuery(query);
System.out.println("ID"+"\t"+"Name"+"\t"+"Rate"+"\t"+"DeptID");
System.out.println("--"+"\t"+"----"+"\t"+"---"+"\t"+"----");
while(result.next());
String name=result.getString("Name");
int ID=result.getInt("ID");
float rate=result.getFloat("Rate");
int deptID=result.getInt("DeptID");
System.out.println(ID+"\t"+name+"\t"+rate+"\t"+deptID);
stmt.close();
con.close();
catch(SQLException ex){
System.err.println("SQLException:" + ex.getMessage());
public static void main(String args[])
Employee app = new Employee("jdbc:odbc:Employee");
app.queryTest();
}

here's your mistake:
while(result.next());  // <--- the loop body is empty.Remove the semi-colon.
%

Similar Messages

  • Problem with JDBC-ODBC bridge

    OS in my PC is Windows7 Ultimate(64-bit), and I had JDK1.7.0_21(compatible with my PC), Oracle 10G ExpressEdition(32-Bit), ApacheTomcat7.0.11(compatible with my PC).
    As my OS is 64-BIT, I accessed C:\Windows\SysWOW64\odbcad32 and  I selected UserDSN tab->Add->Microsoft ODBC for Oracle->finish,tapply->ok. Then a Dialog Box appeared and I entered a DSN name=ramsdsn and my DATABASE USERID=rams in username->ok->apply->ok.
    But when I tried to compile my program using:
          DriverManager.getConnection("jdbc:odbc:ramsdsn","rams","rams");
    I got an error:java.sql.SQLException: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
    Help me FRNZ.. I have been trying it for 7 days and I'm tired of it and I could not figured it yet...
    THANKS in Advance...

    Wrong database is the most likely reason.
    Note that the ODBC driver is not a good driver for MS SQL Server. It handles varchar as chars. So an insert of 'A' into a varchar(25) will end up with 'A' followed by 24 spaces. And that probably isn't what you want your varchars to do.

  • JDBC ODBC bridge connections using 2.1.1

    Hi,
    I have reviewed a lot of postings related to JDBC and third party drivers and understand how to connect to the packaged drivers such as MySQL and MS SQL Server/Sybase. Where I'm stuck is the reference in the Connections help to JDBC. We have a ODBC system DSN that's not part of the existing JDBC drivers. The help implies it's possible to create a JDBC:ODBC bridge connection and that JDBC:ODBC bridge functionality is part of the JDK therefore should not require additional jar files. However, the JDBC tab is not an available connection type by default. I traced the JDBC ODBC bridge to the rt.jar and tried adding that to the third party extensions but that has not resulted in the JDBC tab becoming available.
    Is the JDBC tab only available when using commercial JDBC ODBC bridge drivers ?
    For all other connections (DB2, TimesTen, Teradata etc) the help is very specific about which jar files you need and any other requirements but the JDBC section it is unclear how you enable JDBC connectivity.
    Thanks
    Steven
    Edited by: slisint on 14-Jan-2011 18:07

    We are using the JDBC-ODBC bridge to do a prepared
    statement. I have seen other bugs that suggest this
    is problematic with older version of JRE, but was
    supposedly fixed in later versions.
    java.sql.SQLException: General errorIf it is not too late, check the following link:
    http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/GettingStartedTOC.fm.html
    Sections 6.1.3 and 8 (especially tables at the end).
    I had the same case, and the problem was that the field in the Oracle database was defined as NUMBER(4), witch is equivalent to INTEGER in JDBC types, and function setInt should be used with INTEGER, instead of setLong.
    This is explained in sections I mentioned.

  • Problem with JDBC ODBC connectivity

    I am trying to connect to MS access database with jsp page. This is sample from my js page :
    String SUN_DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";
    Class.forName(SUN_DRIVER);
    String aDataSourceName = "puneet";
    String url = "jdbc:odbc:" + aDataSourceName;
    Connection con;
    con = DriverManager.getConnection("jdbc:odbc:puneet","","");
    The last line gives me the follwoing error :
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    puneet is name of my datasource and it points to my .mbd file.
    I dont have anyusername or passwords for this daatsource.
    I am using Tomcat/4.1.18-LE and jdk1.4
    I have also added rt.jar in the classpath
    pls help
    pg4

    Hi pg4,
    May be your dsn is not pointing to .mdb file. Check it by putting your mdb file right where your code is and then user following syntax which is called dsn-less connection. It helps you to connect to the target mdb file with out any need of dsn.
    String url = "jdbc:odbc:;Driver={Microsoft Access Driver (*.mdb)}; DBQ=yourDBFile.mdb";
    regards,
    Humayun

  • Newbie: Problem with jdbc-odbc and MS SQL server 2005

    I'm on win vistax64 with SQLSERVER 2005 and I have set up the odbc source as system dsn using the SQL Native Client driver with SQL authentication and the connectivity test in the end succeeds.
    I'm trying to make a simple web app that will connect to the database and perform simple querries. It's a school assignment.
    I'm using the jdbc-odbc bridge because it's the simplest way to do it and it's what we were shown in class.
    I get the following irritating error:
    "Cannot establish a connection to jdbc:odb:sstmdb using sun.jdbc.odbc.JdbcOdbcDriver ([Microsoft][ODBC Driver Manager] Data source name not found and no default driver specifies)".
    I'm working with netbeans 5.5.1 and this error is what I get when in the runtime tab I try to connect with the jdbc-odbc. I get a similar error in the logs when I try to run the app on the j2ee server.
    This is the java class that establishes the connection.
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class Connector {
        private static final String dbUrl="jdbc:odbc:sstmdb";
        private static final String user="kimon";
        private static final String password="jackohara";
        public static Connection getConnection(){
            Connection conn = null;
            try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                conn = DriverManager.getConnection(dbUrl,user,password);
            } catch (SQLException e) {
                e.printStackTrace(); 
            } catch (ClassNotFoundException e) {
                e.printStackTrace(); 
            return conn;
    }It has worked perfectly on my school PC with winXP and MSDE2000.
    What am I missing?

    Ok, help came from an other way where I was inquiring about a different problem:
    Connectivity works fine by using User DSN instead of System DSN for the ODBC source.

  • Problems with JDBC-ODBC Driver

    Hello,
    I am trying to access a DSN on my windows with a dedicated DB driver of some company. so i used the JDBC-ODBC connector.
    when launching the java code, and debugging the problem i get the following error:
    DriverManager.getConnection("jdbc:odbc:priority32;UID=Manager;PWD=keren")
        trying driver--className=com.mysql.jdbc.Driver,com.mysql.jdbc.Driver@16caf43--
        trying driver--className=sun.jdbc.odbc.JdbcOdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver@66848c--
    *Driver.connect (jdbc:odbc:priority32;UID=Manager;PWD=keren)
    JDBC to ODBC Bridge: Checking security
    No SecurityManager present, assuming trusted application/applet
    JDBC to ODBC Bridge 2.0001
    Current Date/Time: Tue Aug 12 07:50:37 VET 2008
    Loading JdbcOdbc library
    Allocating Environment handle (SQLAllocEnv)
    hEnv=50338088
    Allocating Connection handle (SQLAllocConnect)
    hDbc=50338256
    Connecting (SQLDriverConnect), hDbc=50338256, szConnStrIn=DSN=priority32;UID=Manager;PWD=keren
    *Connection.getMetaData
    *DatabaseMetaData.getDriverName
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=6, len=300
    tabula.dll
    *DatabaseMetaData.getDriverVersion
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=7, len=300
    07.00.0000
    *DatabaseMetaData.getDriverName
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=6, len=300
    tabula.dll
    Driver name:    JDBC-ODBC Bridge (tabula.dll)
    *DatabaseMetaData.getDriverVersion
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=7, len=300
    07.00.0000
    Driver version: 2.0001 (07.00.0000)
    Caching SQL type information
    *Connection.getMetaData
    *DatabaseMetaData.getTypeInfo
    Allocating Statement Handle (SQLAllocStmt), hDbc=50338256
    hStmt=50339424
    Get type info (SQLGetTypeInfo), hStmt=50339424, fSqlType=0
    Number of result columns (SQLNumResultCols), hStmt=50339424
    value=15
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=10, len=300
    03.52.0000
    Fetching (SQLFetch), hStmt=50339424
    Column attributes (SQLColAttributes), hStmt=50339424, icol=1, type=2
    value (int)=12
    Column attributes (SQLColAttributes), hStmt=50339424, icol=1, type=3
    value (int)=129
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    CHAR
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=12
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    CHAR(1)
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=1
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    RCHAR
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=12
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    REAL
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=6
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    INT
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=4
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    UNSIGNED
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=4
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    TIME
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=10
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    DATE
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=11
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    DATE
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=9
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    DAY
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=4
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    DECIMAL
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=3
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    End of result set (SQL_NO_DATA)
    *ResultSet.close
    Free statement (SQLFreeStmt), hStmt=50339424, fOption=1
    *ResultSet has been closed
    Get connection info (SQLGetInfo), hDbc=50338256, fInfoType=44
    int value=0
    Get connection info (SQLGetInfo), hDbc=50338256, fInfoType=121
    RETCODE = -1
    ERROR - Generating SQLException...
    SQLState(S1096) vendor code(0)
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Information type out of range
        at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbc.SQLGetInfo(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcConnection.checkBatchUpdateSupport(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at WigsUpdate.main(WigsUpdate.java:25)
    getConnection returning driver--className=sun.jdbc.odbc.JdbcOdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver@66848c--what can be done?
    thank you very much

    HimberJack wrote:
    oh now i understand.
    i got a very unknown company which supplied the ODBC driver, but they dont have java driver...
    so I have nothing to do about it?The choices are find a different driver or use the one you have.
    The one you have doesn't do batches.
    Finding a different driver could involve the following.
    - Buying one from somewhere else
    - Pay someone to write one.
    - Write a driver yourself.
    All of those are somewhat dependent that the "unknown company" has an API that supports that. You (or someone) could also figure out the file format of the "unknown company" as well and then write one.

  • Jdbc-odbc-bridge connection pool

    I got a problem with odbc connection pool in my Sun App Server 7.
    When i try to connect to the odbc database (msaccess or conzept16), i got a SQLException : com.sun.enterprise.repository.J2EEResourceException
    java.lang.NoSuchMethodException: setdatabaseName .....
    It seems that i cant set any propertys like url, user or password. The exception throws every time NoSuchMethodException: setURL or ... NoSuchMethodException: setUser
    I tried this with pointbase database and pointbase drivers and there was no problem. Also when i connect direct from jsp page to the odbc database without connection pool it works.
    How can i set a propper connection pool with the jdbc-odbc-bridge? Please Help. There is no jdbc driver for that database available.
    Is that right using sun.jdbc.odbc.JdbcOdbcDriver for that?
    here my server.xml
    <resources>
    <jdbc-resource enabled="true" pool-name="access-pool" jndi-name="jdbc/AccessDB"/>
    <jdbc-connection-pool steady-pool-size="2" max-pool-size="6" max-wait-time-in-millis="60000" pool-resize-quantity="2" idle-timeout-in-seconds="300" is-isolation-level-guaranteed="false" is-connection-validation-required="false" connection-validation-method="auto-commit" fail-all-connections="false" datasource-classname="sun.jdbc.odbc.JdbcOdbcDriver" name="access-pool" validation-table-name="TAB_NAME">
    <property value="jdbc:odbc:testdb" name="databaseName"/>
    </jdbc-connection-pool>
    </resources>

    AFAIK the bridge driver does not support multipleopen
    connections (which is what connection pooling
    requires).Wrong.
    It might be the case that the bridge AND ms access
    does not support that but I seriously doubt that as
    well.
    Yesterday I didn't want to test this. Today I did.
    So I can state that it is completely wrong.
    There might be some other reason preventing the usage in a pool, but it isn't the number of open connections.

  • JDBC-ODBC-Bridge connection to SQL Database

    Hi guys
    I have a problem. I've made a little game which I want to put on my website. It has a highscore-list which I want to connect to my web host's database server to get the current list.
    I tried this with JDBC and got it to work locally but when I uploaded it to my site it didn't work. I contacted my web host's technical support who told me that their server didn't have the JDBC driver and that I should use ODBC instead. I did lots of reading and found out about this JDBC-ODBC-Bridge. I have since been trying to implement this into my program but hasn't been successful.
    In my original JDBC connection I used
    private String url = "jdbc:mysql://" + host +  "/" + mydatabase;
    Class.forName("com.mysql.jdbc.Driver");
    Connection connection = DriverManager.getConnection(url, username, password);Now I'm trying
    private String url = "jdbc:odbc://" + host + "/" + database;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection connection = DriverManager.getConnection(url, username, password);But, at least when trying it locally, I get the error
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name is too long.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
    at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3073)
    at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    at HighscoreDB.readFile(HighscoreDB.java:53)
    at HighscoreDB.displayList(HighscoreDB.java:97)
    at HighscoreDB.main(HighscoreDB.java:33)Please help ;)
    Edited by: YZF-R1 on 2009-apr-09 13:26

    YZF-R1 wrote:
    masijade. wrote:
    Do you know what ODBC is?I think I at least have the basic idea, I learnt most of what I know from this post:
    [http://forums.sun.com/thread.jspa?threadID=211735&start=2&forumID=48]
    masijade. wrote:
    While "reading about this JDBC-ODBC Driver" did you also read about how to enter the URLs for it?No, I couldn't find that piece of information, why don't you tell me ;)
    Here
    >
    masijade. wrote:
    Did also read about the fact about needing to configure ODBC DSNs? Or about the fact that the connection URL is radically different if you don't configure one?No I did not. Please explain =)
    Here
    >
    PhHein wrote:
    Plus, JDBC-ODBC Bridges are evil!I'm beginning to realize this myself :O:(
    BalusC wrote:
    Drop that whole ODBC idea and just gently read the documentation which come along with the MySQL JDBC driver.I read a lot of it when I used the JDBC driver locally but how's that going to help me if the server doesn't have the JDBC driver installed?How will the Bridge help you if the ODBC Driver is not installed? And, the JDBC Driver (the Type 4.0 ones, which the MySQL Driver is) is 100% Java, so it can even be included in an Applet, if the HTML page that accesses it is done right, and the jars are "packaged" properly.

  • JDBC-ODBC bridge connection failure.

    I'm new to JDBC and JDeveloper and am having some difficulty
    getting through the database applet tutorial.
    I'm trying to connect to a Microsoft Access database using the
    JDBC-ODBC Bridge. This is an interim stage before using a Linux
    Oracle database which is not yet up and running.
    When trying to add a data form, the database wizard fails at
    step 4 of 7 after selecting the Sun JDBC-ODBC bridge and the
    required data source the following error is presented:
    Connection error
    Vendor code 84
    [Microsoft][ODBC Microsoft Access 97 Driver]Driver not capable
    I also tried setting up (using ODBC manager) a System DSN for a
    text and Excel data source, but met similar problems e.g:
    [Microsoft][ODBC Excel Driver]Driver not capable
    Currently JDeveloper Beta 2.0 (build 184) and the ODBC source
    are on the same NT4.0 (SP4) machine.
    To confuse matters I'm actually running Access 95, rather than
    Access 97.
    I have previously successfully connected to an Access ODBC
    source via JDBC in a Java application (not applet) when
    following a tutorial example that comes with the Sun JDK 1.2. I
    note, however, that jdbcodbc.dll that's part of JDK 1.2 is newer
    (and bigger - 32K 01Dec98) than that supplied with the
    JDeveloper Beta 2.0 (22K 05Nov98)
    I'm a bit lost with this problem since nothing happens after
    pressing help on the error dialog, and I'm not sure where to
    look for log files etc. to further debug the problem. Any help
    would be gratefully received!
    null

    The error indicates that the bridge is making a call to the
    driver which it cannot handle -- either because the call is
    invalid/unreasonable or because the driver doesn't implement the
    functionality requested. An ODBC trace will determine which of
    the two is true. If the first, you need to contact the bridge
    provider to get a fix. If the second -- the ODBC driver
    provider.
    null

  • Oracle RDB Driver fails with JDBC/ODBC Bridge

    Has anyone experienced problems using the latest Oracle RDB
    Driver (3.0.2.0) with the JDBC/ODBC Bridge.
    We have been using the Oracle ODBC Driver for RDB (2.10.17)
    successfully on NT, but it is not supported on W2K. The new
    drivers work fine for Access etc., but fail with the bridge.
    Specifically, you can step thru a result set, but getObject()
    returns null for all fields.
    Any suggestions?
    Joe

    This forum is for general suggestions and feedback about the OTN
    site. For technical question about an Oracle product, you can
    select the appropriate discussion forum in our 'Discussions'
    section at: http://forums.oracle.com/forums/homepage.jsp
    Best regards, OTN Team

  • Jdbc-odbc bridge connection error

    Hi,
    Please help me to create a jdbc-odbc connection from Jdev10g to a TSM server database.
    I have created a database connection with the following parameters:
    Connection name: tsm1a
    Connection type: jdbc-odbc bridge
    Username: admin
    Password: ***
    Datasource name: tsm1 (this is the name of the DSN datasource name in my Windows ODBC DSN datasource)
    Extra parameters: NONE
    Clicking on the Test button shows Success!
    I have tried to launch the SQL worksheet, it is success and give me a correct result to my "select * from volumes" query.
    I have created a simple JSP page:
    <%@ page contentType="text/html;charset=windows-1250"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/sqltaglib.tld"
    prefix="database"%>
    <html>
    <body>
    <database:dbOpen connId="c1" URL="jdbc:odbc:TSM1a" user="admin" password="***">
    <database:dbQuery connId="c1" output="html" queryId="q1" >
    select * from volumes
    </database:dbQuery>
    </database:dbOpen>
    </body>
    </html>
    The result of the run of it:
    javax.servlet.jsp.JspTagException: Failed to establish connection     at oracle.jsp.dbutil.tagext.dbOpenTag.doStartTag(dbOpenTag.java:115)
    Please help me, how to get a connection to the ODBC datasource from a jsp page.
    What is wrong in the URL string or elsewhere ?
    Thanks a lot in advance:
    Arpad

    Hi,
    Please help me to create a jdbc-odbc connection from Jdev10g to a TSM server database.
    I have created a database connection with the following parameters:
    Connection name: tsm1a
    Connection type: jdbc-odbc bridge
    Username: admin
    Password: ***
    Datasource name: tsm1 (this is the name of the DSN datasource name in my Windows ODBC DSN datasource)
    Extra parameters: NONE
    Clicking on the Test button shows Success!
    I have tried to launch the SQL worksheet, it is success and give me a correct result to my "select * from volumes" query.
    I have created a simple JSP page:
    <%@ page contentType="text/html;charset=windows-1250"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/sqltaglib.tld"
    prefix="database"%>
    <html>
    <body>
    <database:dbOpen connId="c1" URL="jdbc:odbc:TSM1a" user="admin" password="***">
    <database:dbQuery connId="c1" output="html" queryId="q1" >
    select * from volumes
    </database:dbQuery>
    </database:dbOpen>
    </body>
    </html>
    The result of the run of it:
    javax.servlet.jsp.JspTagException: Failed to establish connection     at oracle.jsp.dbutil.tagext.dbOpenTag.doStartTag(dbOpenTag.java:115)
    Please help me, how to get a connection to the ODBC datasource from a jsp page.
    What is wrong in the URL string or elsewhere ?
    Thanks a lot in advance:
    Arpad

  • Problem using Jdbc-Odbc Bridge

    Hi,
    I am using Java 2 SDK and I am trying to access MS Access database on my machine using Jdbc-Odbc bridge. I have set up the DSN in ODBC. But I get the following error when I run my program -
    'No Suitable Driver'
    Here's my code snippet-
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    String dsn = "jdbc:odbc:DriverInfoDB";
    Connection con = DriverManager.getConnection(dsn,"","");
    con.setAutoCommit(false);
    Statement stmt;
    String query = null; // SQL select string
    ResultSet rs; // SQL query results
    stmt = con.createStatement();
    .....etc etc...
    Where is the error in this code??
    Help Needed!!
    Thanks
    Vivek.

    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection(dsn,"guest","guest");
    OR DriverManager.getConnection(dsn);
    System.out.println("Conection's opened");
    catch(ClassNotFoundException cnfe)
    System.err.println(cnfe);
    catch(SQLException sqle)
    System.err.println(sqle);
    try that code and double check you DSN Name . it's a good practice to greate a system DSN.
    i hope that helps.
    FEEL FREE TO ASK. WON'T BITE U
    ABDUL

  • Problem with jdbc:odbc returning incorrect number of rows.

    Hello,
    Am sure i have done something stupid, but i have an issue with jdbc:odbc ....
    It is a simple sceanrio that i have coded umpteen times before ...
    I have the following ....
    1. Connection to DB2 on an IBM i5 (I apologise for not using native drivers from jt400.jar, but i had an ODBC code example and was in a rush - no excuse i know)
    2. Statement object created from connection above
    3. A string with my SQL in it
    4. A result set for the results.
    These are created as follows:
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection(ODBCSource, userID, password);
    if (con == null) {
    // error handling not relevant here
    } else {
    Statement s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    String SQL = "select * from table";
    ResultSet rs = s.executeQuery(SQL);
    i then try to loop ....
    while (rs.next() )
    // stuff
    however, i only ever get one result .... if i stick in the check for isLast, the first loop hits this check, i get my little status message, and the loop ends.
    while (rs.next() )
    if (rs.isLast() )
    System.out.println("I am on last record");
    BUT if i run the SQL
    "select count(*) from table" ... i get a count of 148 !!
    I tried setting the FetchSize through setFetchSize(), but made no difference.
    This is running on a JBoss server 4.2.1GA, JDK is "jdk1.6.0_02" .... i have a suspicion that this may be a JBoss specfic issue, as this exact code runs just fine on the Domino platform that it was originally on, if this is the case, i apologise for wasting everyones time .... but would still appreciate any pointers you can give me.
    Cheers

    Hello,
    Thanks for the reply, I am not sure i follow what you are saying.
    I only mentioned JBoss as it is the application server that we have deployed to and because the orignal code ran fine on a Domino server, I will take your advice and try to run it through in debug rather than running actually on the application server.
    Am i incorrect in my assumption that if "select count(*) from table" gives a count of 148, i should expect 148 records in a result set created from "select * from table" ? This is all rather new to me so i apologise if this is incorrect, I'd love to know why this is incorrect so i dont make similar mistakes in future.
    Also, If i run this same code on the previous platform, i get 148 iterations of the code contained within
    while (rs.next() ) { ... }
    When the war file is deployed to JBoss, the same SQL statement gives a result set that only iterates once for
    while (rs.next() ) { ... }
    The previous platform as I say was domino, but it was running as a lotus notes java agent (despite not using any notes documents etc) as it happened to be where the web pages that call this process were located. It is possible that some of the main code has changed as I had cut and paste the code into a servlet using MyEclipse, but i have double checked the bit that does this SQL request and it is identical
    To complete the picture, the new servelt is then called from the action tag on the submit form on a JSP, when it ends the servlet redirects via the requestdispacher to success or failure jsp pages depending on the outcome of the processing.
    Thank you again for your help.

  • Ms Access problems with Jdbc Odbc!!!

    Hi again people,
    Im creating a GUI swing project connecting a database (MsAccess) to a dialog using the bridge driver,
    The GUI is coming up but im getting runtime errors and the data does not go to the fields, the dialog and connection are in two files:
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*; //SQL package for the statements
    import javax.swing.*;
    class DatabaseMan
         public ResultSet m_resultSet; //recordset resulting from SQL query
         public ResultSetMetaData m_rsmd; //used to get general info about the columns
         private int m_nNumberOfFields; //number of fields in a recordset
         private Connection conn;
         private Statement stmt;
         public DatabaseMan(String strSQLQuery)
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");          
                   try               //establish connection to the database
                        //try to get connection to the database
                        conn = DriverManager.getConnection("jdbc:odbc:db1");
                        //this is not where we update the database so we make it read only
                        stmt = conn.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,
                                                                     ResultSet.CONCUR_READ_ONLY);                                   
                        m_resultSet = stmt.executeQuery(strSQLQuery);
                   catch(SQLException exSQL)
                        System.err.println("\n\n\t\t ***SQLException has" +
                                                 "been caught ***\n\n");
                   while ( exSQL != null)
                        System.err.println("\nSQLState : " + exSQL.getSQLState() );
                   System.err.println("\nMessage : " + exSQL.getMessage() );
                             System.err.println("\nVendor code : "+ exSQL.getErrorCode() );
                             System.err.println("\n");
                             exSQL = exSQL.getNextException();
              catch( ClassNotFoundException e)
                   System.err.print("\n\n\tClassNotFoundException has"
                                       +" been caught");
                   System.err.println( e.getMessage());
              catch( java.lang.Exception ex )
                   ex.printStackTrace();
         public void CloseConnection() //close connection to database
              try
                        conn.close();
                        stmt.close();
                        m_resultSet.close(); //release the resources
                   catch (SQLException exSQL )
                        System.out.println("SQL Exception: " + exSQL.getMessage());
                        exSQL.printStackTrace(System.out);
         public int getNoFields()
              return m_nNumberOfFields;
    } //end of DatabaseMan.java
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    import DatabaseMan;
    import javax.swing.*;
    class DBviewer extends JDialog implements ActionListener
         //JButtons to create toolbar
         private JButton m_buttonFirst;
         private JButton m_buttonNext;
         private JButton m_buttonPrevious;
         private JButton m_buttonLast;
         private JButton m_buttonClose;
         private JButton m_mainbuttonClose;
         //textfields to transfer the data from database
         private JTextField m_name;
         private JTextField m_age;
         private JTextField m_weight;
         private JTextField m_professionalism;
         private JTextField m_speed;
         private JTextField m_acceleration;
         private JTextField m_jump;
         private JTextField m_stamina;
         private JTextField m_bravery;
         private JTextField m_fitness;
         private JTextField m_experience;
         //labels to identify the textfields
         private JLabel m_labelname;
         private JLabel m_labelage;
         private JLabel m_labelweight;
         private JLabel m_labelspeed;
         private JLabel m_labelacceleration;
         private JLabel m_labelprofessionalism;
         private JLabel m_labeljump;
         private JLabel m_labelstamina;
         private JLabel m_labelbravery;
         private JLabel m_labelfitness;
         private JLabel m_labelexperience;
         DatabaseMan m_DatabaseMan;
         private String strSQLQuery1;
         private String type1 = new String("");
         public DBviewer(Frame parent, String caption, boolean bModal, String type)
              super(parent,caption,true);
              setSize(600,400);
              setLocation( new Point(150 , 150 )); //position it pops up on screen.
              setResizable(false);
              strSQLQuery1 = new String("");
              type1 = type;
              //SQL query to show the horse database
              if(type =="Horse")
                   strSQLQuery1 ="SELECT *" +
                                  "FROM HORSE";
                   buildHorseGUI();
              if(type =="Jockey")
                   strSQLQuery1 ="SELECT *" +
                                  "FROM JOCKEY"+
                                  " ORDER BY NAME";
                   buildJockeyGUI();                         
              if(type =="Course")
                   strSQLQuery1 ="SELECT *" +
                   "FROM RACECOURSE"+
                                  " ORDER BY NAME";
                   buildCourseGUI();
              m_DatabaseMan = new DatabaseMan(strSQLQuery1);
              /*try
              {//reset values with default move up to top later
                   if(m_DatabaseMan.m_resultSet.first())
                        transferData(type1);
              catch( SQLException exSQL)
                   System.out.println("SQL Exception: " + exSQL.getMessage());
                   exSQL.printStackTrace(System.out);
         public void buildHorseGUI() //construct the horse GUI
              buildDefaultGUI(); //build default buttons and toolbar
              m_labelname = new JLabel(" Horse Name:",JLabel.CENTER);
              m_labelname.setBackground(Color.blue);
              m_labelname.setForeground(Color.white);
              m_labelage = new JLabel("Age: ",JLabel.CENTER);
              m_labelage.setBackground(Color.blue);
              m_labelage.setForeground(Color.white);     
              m_labelweight = new JLabel("Weight(p): ",JLabel.CENTER);
              m_labelweight.setBackground(Color.blue);
              m_labelweight.setForeground(Color.white);
              m_labelspeed = new JLabel("Speed:",JLabel.CENTER);
              m_labelspeed.setBackground(Color.blue);
              m_labelspeed.setForeground(Color.white);
              m_labelacceleration = new JLabel("Acceleration:",JLabel.CENTER);
              m_labelacceleration.setBackground(Color.blue);
              m_labelacceleration.setForeground(Color.white);
              m_labelprofessionalism = new JLabel("Professionalism:",JLabel.CENTER);
              m_labelprofessionalism.setBackground(Color.blue);
              m_labelprofessionalism.setForeground(Color.white);
              m_labeljump = new JLabel("Jump:",JLabel.CENTER);
              m_labeljump.setBackground(Color.blue);
              m_labeljump.setForeground(Color.white);
              m_labelstamina = new JLabel("Stamina:",JLabel.CENTER);
              m_labelstamina.setBackground(Color.blue);
              m_labelstamina.setForeground(Color.white);     
              m_labelbravery = new JLabel("Bravery:",JLabel.CENTER);
              m_labelbravery.setBackground(Color.blue);
              m_labelbravery.setForeground(Color.white);
              m_labelfitness = new JLabel("Fitness:",JLabel.CENTER);
              m_labelfitness.setBackground(Color.blue);
              m_labelfitness.setForeground(Color.white);     
              m_labelexperience = new JLabel("Experience",JLabel.CENTER);
              m_labelexperience.setBackground(Color.blue);
              m_labelexperience.setForeground(Color.white);          
              //creation of textfields to hold the data
              //making them non-editable and b/ground of black with white text
              m_name = new JTextField(20);
              m_name.setEditable(false);
              m_name.setBackground(Color.black);
              m_name.setForeground(Color.white);
              m_age = new JTextField(2);
              m_age.setEditable(false);
              m_age.setBackground(Color.black);
              m_age.setForeground(Color.white);
              m_weight = new JTextField(3);
              m_weight.setEditable(false);
              m_weight.setBackground(Color.black);
              m_weight.setForeground(Color.white);
              m_speed = new JTextField(2);
              m_speed.setEditable(false);
              m_speed.setBackground(Color.black);
              m_speed.setForeground(Color.white);
              m_acceleration = new JTextField(2);
              m_acceleration.setEditable(false);
              m_acceleration.setBackground(Color.black);
              m_acceleration.setForeground(Color.white);
              m_professionalism = new JTextField(2);
              m_professionalism.setEditable(false);
              m_professionalism.setBackground(Color.black);
              m_professionalism.setForeground(Color.white);
              m_jump = new JTextField(2);
              m_jump.setEditable(false);
              m_jump.setBackground(Color.black);
              m_jump.setForeground(Color.white);
              m_stamina = new JTextField(2);
              m_stamina.setEditable(false);
              m_stamina.setBackground(Color.black);
              m_stamina.setForeground(Color.white);
              m_bravery = new JTextField(2);
              m_bravery.setEditable(false);
              m_bravery.setBackground(Color.black);
              m_bravery.setForeground(Color.white);
              m_fitness = new JTextField(2);
              m_fitness.setEditable(false);
              m_fitness.setBackground(Color.black);
              m_fitness.setForeground(Color.white);
              m_experience = new JTextField(2);
              m_experience.setEditable(false);
              m_experience.setBackground(Color.black);
              m_experience.setForeground(Color.white);
              //create a panel to hold this data
              Panel data = new Panel();
              data.setLayout(new GridLayout(0,4));
              data.setBackground(Color.blue);
              data.add(m_labelname);
              data.add(m_name);
              data.add(m_labelage);
              data.add(m_age);
              data.add(m_labelweight);
              data.add(m_weight);
              data.add(m_labelspeed);
              data.add(m_speed);
              data.add(m_labelacceleration);
              data.add(m_acceleration);
              data.add(m_labelprofessionalism);
              data.add(m_professionalism);
              data.add(m_labeljump);
              data.add(m_jump);
              data.add(m_labelstamina);
              data.add(m_stamina);
              data.add(m_labelbravery);
              data.add(m_bravery);
              data.add(m_labelfitness);
              data.add(m_fitness);
              data.add(m_labelexperience);
              data.add(m_experience);
              getContentPane().add(data, BorderLayout.CENTER);
         public void buildDefaultGUI() //construct the default components for GUI
              JToolBar wndToolBar = new JToolBar();
              wndToolBar.setBackground(Color.green);
              wndToolBar.setFloatable(false);
              m_buttonFirst = new JButton( new ImageIcon( "graphic/myFirst.gif" ) );
              m_buttonPrevious = new JButton(new ImageIcon( "graphic/myPrevious.gif" ) );
              m_buttonNext = new JButton(new ImageIcon( "graphic/myNext.gif" ) );
              m_buttonLast = new JButton(new ImageIcon( "graphic/myLast.gif" ) );
              m_buttonClose = new JButton(new ImageIcon( "graphic/myClose.gif" ) );
              m_mainbuttonClose = new JButton("CLOSE");
              // implement action listener
              m_buttonFirst.addActionListener(this);
              m_buttonPrevious.addActionListener(this);
              m_buttonNext.addActionListener(this);
              m_buttonLast.addActionListener(this);
              m_buttonClose.addActionListener(this);
              m_mainbuttonClose.addActionListener(this);
              //set the tool tips for each of the button
              m_buttonFirst.setToolTipText( "Display first record" );
              m_buttonPrevious.setToolTipText( "Display previous record" );
              m_buttonNext.setToolTipText( "Display next record" );
              m_buttonLast.setToolTipText( "Display last record" );
              m_buttonClose.setToolTipText( "Close this window and return to game" );
              m_mainbuttonClose.setToolTipText( "Close this window and return to game" );
              m_mainbuttonClose.setBackground(Color.green);
              //add these buttons to the toolbar
              wndToolBar.add( m_buttonFirst );
              wndToolBar.add( m_buttonPrevious );
              wndToolBar.add( m_buttonNext );
              wndToolBar.add( m_buttonLast );
              wndToolBar.addSeparator(); //separator in the toolbar
              wndToolBar.add( m_buttonClose );
              getContentPane().add(wndToolBar, BorderLayout.NORTH);
              getContentPane().add(m_mainbuttonClose, BorderLayout.SOUTH);
         public void buildCourseGUI() //construct the course GUI
              buildDefaultGUI();
         public void buildJockeyGUI() //construct the jockey GUI
              buildDefaultGUI();
         public void actionPerformed( ActionEvent evt)
              //button first record is pressed
              if( evt.getSource() == m_buttonFirst )
                   try
                        if( m_DatabaseMan.m_resultSet.first() )
                             transferData(type1);
                   catch (SQLException exSQL )
                        System.err.println( exSQL.toString() );
              //button next record is pressed
              if( evt.getSource() == m_buttonNext )
                   try
                        if(!m_DatabaseMan.m_resultSet.isLast())
                             if(m_DatabaseMan.m_resultSet.next())
                                  transferData(type1);
                   catch (SQLException exSQL )
                        System.err.println( exSQL.toString() );
              //previous button is pressed
              if( evt.getSource() == m_buttonPrevious )
                   try
                        if( !m_DatabaseMan.m_resultSet.first())
                             if(m_DatabaseMan.m_resultSet.previous())
                                  transferData(type1);
                   catch (SQLException exSQL )
                        System.err.println( exSQL.toString() );
              //last button is pressed
              if( evt.getSource() == m_buttonLast )
                   try
                        if(m_DatabaseMan.m_resultSet.last())
                             transferData(type1);
                   catch (SQLException exSQL )
                        System.err.println( exSQL.toString() );
              // close button(s) pressed
              if( evt.getSource() == m_buttonClose)
                   setVisible( false );
                   dispose(); //return the dialog window resources
                   m_DatabaseMan.CloseConnection();
              if( evt.getSource() == m_mainbuttonClose)
                   setVisible( false );
                   dispose(); //return the dialog window resources
                   m_DatabaseMan.CloseConnection();
         public void transferData(String type1) throws SQLException //return a String
              if(type1 =="Horse")
                   //transfer horse details
                   m_name.setText(m_DatabaseMan.m_resultSet.getString("NAME"));
                   m_professionalism.setText(m_DatabaseMan.m_resultSet.getString("PROFESSIONALISM"));
                   m_speed.setText(m_DatabaseMan.m_resultSet.getString("SPEED"));
                   m_stamina.setText(m_DatabaseMan.m_resultSet.getString("STAMINA"));
                   m_weight.setText(m_DatabaseMan.m_resultSet.getString("WEIGHT"));
                   m_experience.setText(m_DatabaseMan.m_resultSet.getString("EXPERIENCE"));
                   m_fitness.setText(m_DatabaseMan.m_resultSet.getString("FITNESS"));
                   m_jump.setText(m_DatabaseMan.m_resultSet.getString("JUMP"));
                   m_age.setText(m_DatabaseMan.m_resultSet.getString("AGE"));
                   m_bravery.setText(m_DatabaseMan.m_resultSet.getString("BRAVERY"));
                   m_acceleration.setText(m_DatabaseMan.m_resultSet.getString("ACCELERATION"));
              if(type1 =="Jockey")
                   m_name.setText(m_DatabaseMan.m_resultSet.getString("NAME"));
                   m_age.setText(m_DatabaseMan.m_resultSet.getString("AGE"));
              if(type1 =="Course")
                   //transfer course details not implemented yet
    } //end of class DBviewer
    I ve set up an odbc driver and the database has data in it but I still get this run time error an no data is transfered to the dialog box
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1525)
    at sun.jdbc.odbc.JdbcOdbcResultSet.reWordAsCountQuery(JdbcOdbcResultSet.java:6268)
    at sun.jdbc.odbc.JdbcOdbcResultSet.calculateRowCount(JdbcOdbcResultSet.java:6061)
    at sun.jdbc.odbc.JdbcOdbcResultSet.initialize(JdbcOdbcResultSet.java:150)
    at sun.jdbc.odbc.JdbcOdbcStatement.getResultSet(JdbcOdbcStatement.java:420)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:250)
    at DatabaseMan.<init>(DatabaseMan.java:34)
    at DBviewer.<init>(DBviewer.java:83)
    at MainWindow.actionPerformed(MainWindow.java:266)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:216)
    at java.awt.Component.processMouseEvent(Component.java:3715)
    at java.awt.Component.processEvent(Component.java:3544)
    at java.awt.Container.processEvent(Container.java:1164)
    at java.awt.Component.dispatchEventImpl(Component.java:2593)
    at java.awt.Container.dispatchEventImpl(Container.java:1213)
    at java.awt.Component.dispatchEvent(Component.java:2497)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
    at java.awt.Container.dispatchEventImpl(Container.java:1200)
    at java.awt.Window.dispatchEventImpl(Window.java:914)
    at java.awt.Component.dispatchEvent(Component.java:2497)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    Im really stuck!!! any suggestions? thanks in advance

    Thank you for your response and sorry for the length
    of code,
    Thats was my first idea that it was asking for
    or something I dont have but I checked my database and
    I dont have any unusually large data entries (most
    between 8-15 letters, the others are numbers) could it
    be something wrong with how I've entered the database
    in MsAccess, or am i barking up the wrong tree again!
    Many thanks
    RobI think you've misunderstood me. This has nothing to do with unusually large data entries, but rather the opposite. You are wrongly expecting data that is shorter than you think. When you call rs.getString(i) to retrieve a column value of a field, and you only want the first 5 characters in the column (instead of 10 or whatever the column size is), you would do something similar to the following:
    String column_value = rs.getString(1).subtstring(0,5);The above expects a String that is at least 5 characters. Your problem is when your column value returned is less than the specified substring index ( in this case 5 ) it will throw an exception. If you changed your code to this, the error will not occur:
    String column_value = rs.getString( 1 ).subtstring( 0, 5);
    if ( column_value.length() > 5 )
    column_value = column_value.substring( 0, 5 );
    }Jamie

  • JDBC ODBC bridge (JDK 1.4) exception in native code

    I am using jdk 1.4 on windows 98. I have written this simple java program which uses jdbc odbc bridge to connect to an MS Access 2000 db.
    An exception in native code is thrown only when I use createStatement with scrollable resultset. If I use createStatement() with default forward only resultset type, then program works.
    import java.sql.*;
    public class Select
         public static void main(String[] args)
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection con = DriverManager.getConnection("jdbc:odbc:shopping");
                   Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
                   String query = "SELECT * from products";
                   ResultSet rs = stmt.executeQuery(query);
                   while (rs.next())
                        String s = rs.getString("name");
                        float n = rs.getFloat("price");
                        System.out.println(s + " " + n);
              catch (ClassNotFoundException e)
                   System.out.println("Class Not Found: " + e.getMessage());
              catch (SQLException e)
                   System.out.println("SQL Exception: " + e.getMessage());
    The program produces this error with scrollable resultset:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D366658
    Function=[Unknown.]
    Library=(N/A)
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Current Java thread:
         at sun.jdbc.odbc.JdbcOdbc.setStmtAttrPtr(Native Method)
         at sun.jdbc.odbc.JdbcOdbc.SQLSetStmtAttrPtr(JdbcOdbc.java:4676)
         at sun.jdbc.odbc.JdbcOdbcResultSet.setRowStatusPtr(JdbcOdbcResultSet.java:4473)
         at sun.jdbc.odbc.JdbcOdbcResultSet.initialize(JdbcOdbcResultSet.java:171)
         at sun.jdbc.odbc.JdbcOdbcStatement.getResultSet(JdbcOdbcStatement.java:423)
         - locked <02C74480> (a sun.jdbc.odbc.JdbcOdbcStatement)
         at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:253)
         at Select.main(Select.java:13)
    Dynamic libraries:
    0x7CC00000 - 0x7CC1D000      D:\WINDOWS\SYSTEM\IMAGEHLP.DLL
    Local Time = Mon Jan 20 00:16:15 2003
    Elapsed Time = 7
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.0_01-b03 mixed mode)
    # An error report file has been saved as hs_err_pid4294751525.log.
    # Please refer to the file for further information.
    Is there any problem with jdbc odbc bridge driver?

    No. This is not a bug. Not all databases support (or have to support) all types of resultsets. It is your responsibility to ensure that a particular resultset is supported before you use it. That said, one would definitely expect a more descriptive error message in case of inadvertant use.

Maybe you are looking for

  • Text breaks / hyphenations – no break?

    Hey, I am curious if there is a way that InDesign can format text boxes so there are no hyphenated words at all. I understand that i can manually select words and format "no break" in the text formatting options, but is there a way to do this for eve

  • How do I change just the user ID for saved passwords?

    I frequent a website where I have two completely separate User IDs and passwords, but Firefox will only save one or the other, not both. I have the same situation on other websites, and have no problem logging in with different IDs, but on this one w

  • How to enable dump file during OSD?

    Hello, I'm having an issue with a line of Dell laptops getting stuck in a reboot loop after the first reboot of our OSD task sequence, which is an SCCM 2012 SP1/MDT 2012 Update 1 Client Task Sequence. After it lays down the OS and reboots for the fir

  • I can not get my spot removal tool to work at all!!

    I have tried numerous times to get my spot removal tool to work; without success.   I have read tons about it and nothing works.  What is going on?? Neither clone nor heal does anything! I am very frustrated with Lightroom 3! tc

  • Software in .zip Format ?

    Just got an Xperia Arc S. I want to put PC Companion and Media go on my home PC, but it doesn't have an internet connection at the moment. I'm reliant on my local library for internet connectivity, and their machines block downloads of .exe files as