Jdbc:odbc problem with SqlDeveloper

Hi Forum!
My organization is evaluating moving to SQL Developer, the only obstacle for this is that we are running Oracle RDB on a VAX machine, RBD requires a special client driver that is able to work with ODBC, which is what we usually do, I am trying to setup a connection using an ODBC DSN with jdbc:odbc:DSNName, I tested this same JDBC URL with a small java class and it runs just fine, so the problem is that in SQL Developer I get an "Failure: -invalid connection information specified. Verify the URL format for the specified driver".
* Has anyone been successful in configuring an ODBC connection on SQL Developer?
* Any suggestion as to how to connect to Oracle RDB using SQL Developer on Windows XP?
Thanks a lot!
Ignacio

Hi,
My experience is the following:
- Install Oracle SQL services 7.2 on Alpha machine.
- Configure an OCI (SQLNET) service in SQL services layer.
- Prepare my Rdb database 7.2 to run SQLNET (RDB_NATCONN scripts) and depending on version add users.
- configure the SQLNET layer (TNSNAME) on client side (warning the default VLS listener port is 1527 on VMS instead 1521).
- start SQL Developper and connect Rdb database via TNSNAME.

Similar Messages

  • JDBC-ODBC Bridge with iAS on Solaris

    Is there any way to use the Sun JDBC-ODBC bridge with the iPlanet
    Application Server running on UNIX (Solaris)? If it is possible, can
    someone who has done it share the basic steps. For example, I cannot
    figure out what parameters to enter when configuring the bridge as a
    datasource and also how to pass certain environment variables (eg the
    LD_LIBRARY_PATH which points to the ODBC driver manager).
    It seems that on Windows iAS has ODBC as a Type 2 JDBC data source (at
    least the manuals have screenshots with ODBC nodes). However I need to
    have iAS running on Solaris (and connecting to a proprietary ODBC
    driver; no JDBC driver is available for this data source).
    I have iAS 6.0 SP3 with iWS 4.1 SP9 on Solaris 8.
    TIA!
    George
    P.S. Apologies if this is a frequently asked question, but I could not
    find archives of the iplanet.ias.* groups. I wish Google would carry
    them...

    Hi,
    I'm not sure if there is a free download available, but you can find some help by visiting the following URL http://www.dbmaker.com/Header/Frame_Forum.htm
    For the exact steps, I think this would be more helpful http://www.dbmaker.com/reference/technotes/jdbc.html
    Please let me know if this helps.
    Regards
    Raj

  • Problem in building JDBC ODBC connection with my stand alone Project.

    Hello Everyone!
    I gave the following command in order to create JAR file:
    C:\app>jar cvfm MyJar.jar Manifest.txt .
    and the Manifest file contains the code: Main - Class: Login
    My Manifest File and the .class codes and the JAR file which is created successfully by the above command are in the same folder "app" and then I run the project both at command prompt by the command : C:\app>java -jar MyJar.jar
    and by double clicking the JAR file. My project is running successfully but, I am using JDBC - ODBC Driver in my project and I want to let this project run in any other computer system. So, any other user who is unknown to the Driver used and Database used in my project can't be able to run my project if the specified driver is not installed in his machine and also there is a bridge of ODBC Data Source (from control panel-- Administrative Tools-- Data Sources(ODBC) )from which Driver is selected and the Database is specified.
    In order to test my application, I had removed the data source name from the Control Panel's Data Sources (ODBC) properties' window. Then I run my project then the following error msg is shown in command prompt:
    C:\app>java -jar MyJar.jar
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
    at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3028)
    at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:3
    23)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at Login.<init>(Login.java:37)
    at Login.main(Login.java:364)
    Error Trace in getConnection() : [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    So, I have a doubt at this point that how a user is able to configure this bridge in order to run my application who is unknown to my project's back-hand? As JRE is essential to run my project so, I have decided to give setup of JRE with my project's CD, may the JDBC - ODBC Driver providing to the user with my application setup solve this problem ?
    Please help me to solve my problem.

    M.V.Asolkar wrote:
    Please please help me.Lets presume hypothetically that the jTDS driver won't work with 2000. It might or might not.
    However the fact remains that your ODBC driver is not working.
    So the first step is to stop trying to run your full application. Instead you create a very simple console application that does nothing but connect to the database.
    Problems that usually occur from that would be.
    1. The connection string is not correct for MS SQL Server.
    2. The connection information for the database is not correct
    3. The database (nothing to do with java) is not configured to accept connections.

  • JDBC/ODBC Problem

    I have wrote a JApplet code that using JDBC/ODBC bridge to connecting a local Database (MS Access).
    I have used signed applet but it doesn't work and returns the following error message:
    java.lang.SecurityException: class "Project1$5"'s signer information does not match signer information of other classes in the same package
         at java.lang.ClassLoader.checkCerts(ClassLoader.java:522)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:485)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:142)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
         at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:108)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
         at Project1.showFieldCombo(Project1.java:328)
         at Project1.ComboBoxShow(Project1.java:472)
         at Project1.init(Project1.java:489)
         at sun.applet.AppletPanel.run(AppletPanel.java:344)
         at java.lang.Thread.run(Thread.java:484)
    Process Exit...
    (I have five class file and I have used them in a signed jar file)
    What can I do to solving this problem?
    Thanks,
    Payam

    I would suggest asking in a different forum since this has nothing to do with JDBC. Perhaps the 'Signed Applets' forum.

  • Oracle 8.1.5 JDBC driver problem with LONGVARCHAR

    Hi, I'm having problem with 8.1.5 release on Solaris with the
    JDBC type 4 driver (thin). If I create the following table
    create table test1 (col1 NUMBER, col2 LONG);
    Using JDBC driver to insert into the second column any string
    longer than 4000 characters causing run time exception. The type2
    driver works fine, but type2 is slow.
    String sql = "insert into test1 (col1, col2) values (1099,?)";
    PreparedStatement stmt ;
    stmt = conn.prepareStatement(sql);
    // create a string with very long value , bigger than 4096
    stmt.setString(1,string);
    stmt.executeUpdate();
    runtime exception:
    java.sql.SQLException: Data size bigger than max size for this
    type
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(Compiled Code)
    at oracle.jdbc.dbaccess.DBError.check_error(Compiled
    Code)
    at oracle.jdbc.ttc7.TTCItem.setArrayData(Compiled Code)
    at
    oracle.jdbc.driver.OraclePreparedStatement.setItem(Compiled Code)
    at
    oracle.jdbc.driver.OraclePreparedStatement.setString(Compiled
    Code)
    at testi.main(Compiled Code)
    Any help is appreciated.
    Thanks
    Steve
    null

    Post the full stacktrace here
    Also you might want to post jdbc related questions to weblogic.developer.
    interest.jdbc
    Kumar
    DreamNEON wrote:
    Hello,
    the NSAPI integration works, also the JSP files.
    But I have still problems with the Jdriver for my Oracle 8.1.5.
    I get the message :
    Failed to invoke startup class
    weblogic.jdbc.common.internal.JdbcStartup=weblogic.jdbc.common.internal.JdbcStartup
    when the WebLogic Server is started.
    Any ideas or hints about that?
    Thanks in advance
    Armin

  • ODBC Problems with SQL Server 2012 on Virtual Machine

    I am having problem with my application after my IT department upgraded to SQL Server 2012 with error "ConngetDataToModify.vi:1"<ERR>Object 0x2222222 is not valid.  I have 4 servers running the same executable without problem before the upgraded. However, after the upgrade 2 of these Server are having the problem with the ODBC connection. Here are my setup, the application was created using LabView8.5, we have 2 physical server box running Window Server 2003, 2 Virtual Machine on Windows Server 2008, and a Virtual Machine with SQL 2012 Server. The 2 physical server running the executable without a problem after the upgrade, but the 2 Virtual Server were unable to connects to the ODBC connection. Anyone have any idea why this is happening , it is the problem with compatibility between my application with Server 2008 and SQL 2012 Server, or is there a problem with both beings Virtual Servers? As I said, the 2 physical Server seem to be running without any problem with the upgrade.

    My guess is that the problem is not specifically with LV. This should be relatively easy to check if you create a UDL file and double click it. This opens a Microsoft wizard which allows you to configure and test DB connections (the UDL file itself is basically just a text file which holds a connection string). If it doesn't work there, it won't work in LV.
    As for what the actual problem is, a common culprit is the firewall, which is easy enough to check by disabling it. Another option is the surface area configuration of SQL Server, which will not allow network connections unless you tell it to.
    It should probably also be noted that LV 8.5 is not officially supported on Windows Server. I'm assuming that's not the issue, but be aware of it.
    Try to take over the world!

  • JDBC Resultset Problem with ORACLE 10.1.0.2

    Hello
    I have a problem with Petstore GenericCatalogDAO. java. The problem is the behaviour of the resultset object when retrieving data from the database.Below are two synareos one that
    works (when) hard coded and one that does not work when parameter values passed into the the result set.
    1. The code the WORKS.
    statement = connection.prepareStatement("select name from employee where a.name ='SMITH' order by name"
    ,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    resultSet = statement.executeQuery();
    resultSet.absolute(1);
    String s = resultSet.getString(1);
    The code that gives me a 'exhausted resultset' error which I think means no results
    String[] parameterValues = new String[] { "SMITH" };
    statement = connection.prepareStatement("select name from employee where a.name =? order by name ",
    ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    for (int i = 0; i < parameterValues.length; i++) {
    statement.setString(i + 1, parameterValues);
    resultSet = statement.executeQuery();
    resultSet.absolute(1);
    String s = resultSet.getString(1);
    There is obviously a problem using these named parametevalues with these preparedstatement resultset, Does anybody know anything about this and a fix for it????
    Cheers. Roger

    Roger,
    It's probably a mistake you made when posting your code, but your query string is incorrect it should be either:
    select name from employee where name = 'SMITH' order by nameor
    select a.name from employee a where a.name = 'SMITH' order by a.nameIn other words you have prefixed a column with a table alias but have not indicated a table alias in the query.
    Also, shouldn't your code be:
    for (int i = 0; i < parameterValues.length; i++) {
        statement.setString(i + 1, parameterValues[ i ]);
    }Or was the "[ i ]" part giving you trouble? (Since "[ i ]" -- without the spaces -- is treated as a text-formatting tag.)
    While I didn't try your specific query, I have no problem using "PreparedStatment"s with parameters.
    What is your environment? Mine is:
    Oracle 10g (10.1.0.4) database on Linux (Red Hat)
    JDK 1.4.2
    ojdbc14.jar JDBC driver (latest version)
    Good Luck,
    Avi.

  • JDBC-ODBC Bridge with iAS on UNIX

    Can the Sun JDBC-ODBC bridge be used with iAS on UNIX (Solaris)? If possible, can someone share the basic steps. For example, what parameters to enter when configuring the bridge as a datasource and also how to pass needed environment variables (LD_LIBRARY_PATH has to have the path of the ODBC driver manager).
    I need to connect to a ODBC driver on UNIX, no JDBC driver is available for this data source, nor is a Windows solution acceptable.
    I have iAS 6.0 SP3 with iWS 4.1 SP9 on Solaris 8.

    Hi,
    I'm not sure if there is a free download available, but you can find some help by visiting the following URL http://www.dbmaker.com/Header/Frame_Forum.htm
    For the exact steps, I think this would be more helpful http://www.dbmaker.com/reference/technotes/jdbc.html
    Please let me know if this helps.
    Regards
    Raj

  • Strange ODBC problem with 64 bit (x64) 10.2 client

    Hi,
    I'm encountering a strange problem with the 64 bit ODBC driver that comes with the 64 bit (x64) 10.2 client. I have installed the client and that all went fine, and I can use sqlplus to access my databases.
    Now, I have setup an ODBC datasource using the Oracle ODBC driver that gets installed and if I click on the Test button and provide correct login information I get connected just fine.
    So, now if I attempt to use this ODBC datasource from a 64 bit program that I am writing, I get the following error message :
    [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve the connect identifier specified.
    I'm know my program is ok because I have tested it with other ODBC drivers and they work. I can't seem to determine what exactly I'm missing that is making this not work. I have set the environment variables TNS_ADMIN and ORACLE_HOME to point to the correct places - I think, but that doesn't help. Also, the Oracle \bin directory is in the path as I thnk it should be.
    I'm stumped. Does anybody have any idea what could be the problem here ?
    Thanks,
    Nick

    Hi,
    I tried that and I couldn't get it to connect using the Oracle ODBC driver. It worked fine if I picked a SQL server ODBC datasource, but not an Oracle one. With the Oracle ODBC DSN, I don't even get an Oracle message, I get an ODBC configuration error.
    I'm pretty sure that the Oracle ODBC driver is 64-bit since the ODBC admin program is a 64-bit program and it is able to do the test ok.
    I'm think that the when using the ODBC driver, there is something in the environment or in the naming of the DSN that I am doing wrong

  • Jdbc-odbc bridge with Connection pool datasource

    I have created a little j2ee app in which an enterprise bean accesses a ms sql server table by creating a JNDI datasource using sun.jdbc.odbc.JdbcOdbcDriver. I can successfully deploy it and run it on the jsdkee 1.3 J2EE server. However, when I attempt to deploy it on WebSphere 4.0 AES, the app fails attempting to make the database connection. The error log states: "Unable to connect to database: the class (sun.jdbc.odbc.JdbcOdbcDriver) does not implement javax.sql.ConnectionPoolDatasource or javax.sql.XADatasource". Which, of course, is probably true, but is there a WebSphere workaround? There is nothing remotely related mentioned at the IBM WebSphere site.

    Thx. So far, I have not found a readily accessible free alternative driver that supports connection pooling. The drivers list notes several corporate offerings that do; freetds may work but I don't know yet. If it does, I will update this discussion.

  • JDBC:ODBC, Resultset with 0 rows throws SqlException

    For short, I have used forte for java version 3.0 ea to create an application which is manipulating data in an MS SQLServer database. Further I have installed JDK 1.3.1 and JRE 1.3.1, running on WINDOWS 2000 os.
    The DB-configuring is set to binary sort order.
    When my program is running a "rs = stmt.executQuery() then the situation is:
    1) If this query results in 1 or more rows in the resultset, everything seems to work fine.
    2) But if the resultset doesn't contains any rows, which is a quit legal result and actually a succes criteria in a certain point in my prg., an SQLException is thrown stating "Invalid object name + 'database tablename in uppercase'". Although the db-tables name is in mixedletters (see the code below).
    For testing purpose I have worked out a quit simpel prg. which reflects the real prg. I enclose it for examining purpose.
    I certaintly hope somebody is able to guide me to a solution.
    Thanks in advance.
    Kind regards
    Kuno Reck
    IBC Systems A/S
    TestCode:
    import java.sql.*;
    import javax.swing.*;
    //import javax.swing.table.*;
    class DBTest {
    private static final String driver = "sun.jdbc.odbc.JdbcOdbcDriver",
    dbUrl = "jdbc:odbc:KEKVRF",
    comUser = "tbs", password = "tbs";
    private static Connection conn;
    private static Statement stmt;
    private static ResultSet rs;
    // String queryDdi = "SELECT DISTINCT N.DdiNumber FROM DdiNumbers N left
    join DdiGroups G on N.DdiNumber = G.DdiNumber and N.ProviderId = G.ProviderId
    WHERE 1 = 1 AND N.DdiNumber BETWEEN 35248305 AND 35248309 ORDER BY N.DdiNumber";
    // String queryDdi = "SELECT DISTINCT N.DdiNumber FROM DdiNumbers N left
    join DdiGroups G on N.DdiNumber = G.DdiNumber and N.ProviderId = G.ProviderId
    WHERE 1 = 1 AND N.DdiNumber = 35248307 ORDER BY N.DdiNumber";
    String queryDdi = "SELECT DdiNumber FROM DdiNumbers WHERE DdiNumber =
    35548307";
    public static void main (String[] args){
    DBTest dbtest = new DBTest();
    public DBTest() {
    try{
    Class.forName(driver);
    conn = DriverManager.getConnection(dbUrl, comUser, password);
    java.sql.DriverManager.setLogStream(java.lang.System.out);
    stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
    rs = stmt.executeQuery(queryDdi);
    if (rs.isBeforeFirst()){
    while (rs.next()) {
    // BEM?RK! KolonneV?rdierne skal l?ses ud i samme r?kkef?lge som de
    selectes i sql-statementet.
    System.out.println("DdiNumber = "+rs.getString("DdiNumber"));
    else{
    JOptionPane.showMessageDialog(null, "> Ddi-number does not exist
    < ", "Validation of input fields", JOptionPane.ERROR_MESSAGE);
    catch (SQLException e){
    JOptionPane.showMessageDialog(null, "No matching records found, " +
    e.getMessage(), "SQLException", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    catch (ClassNotFoundException cnfe){
    JOptionPane.showMessageDialog(null, "ClassNotFoundException, " +
    cnfe.getMessage(), "ClassNotFoundException", JOptionPane.ERROR_MESSAGE);
    LogStream:
    C:\jdk1.3.1\bin>java DBTest
    *Connection.createStatement
    Allocating Statement Handle (SQLAllocStmt), hDbc=148181752
    hStmt=148185176
    Setting statement option (SQLSetStmtOption), hStmt=148185176, fOption=6,
    vParam=3
    Setting statement option (SQLSetStmtOption), hStmt=148185176, fOption=7,
    vParam=1
    Registering Statement sun.jdbc.odbc.JdbcOdbcStatement@17d257
    *Statement.executeQuery (SELECT DdiNumber FROM DdiNumbers WHERE DdiNumber =
    3554830
    7)
    *Statement.execute (SELECT DdiNumber FROM DdiNumbers WHERE DdiNumber = 35548307)
    Free statement (SQLFreeStmt), hStmt=148185176, fOption=0
    Executing (SQLExecDirect), hStmt=148185176, szSqlStr=SELECT DdiNumber FROM
    DdiNumbe
    rs WHERE DdiNumber = 35548307
    Number of result columns (SQLNumResultCols), hStmt=148185176
    value=1
    Get statement option (SQLGetStmtOption), hStmt=148185176, fOption=6
    value=3
    SQLWarning: reason(Result set type has been changed.)
    Number of result columns (SQLNumResultCols), hStmt=148185176
    value=1
    Number of affected rows (SQLRowCount), hStmt=148185176
    value=0
    Fetching (SQLFetchScroll), hStmt=148185176
    End of result set (SQL_NO_DATA)
    Get statement option (SQLGetStmtOption), hStmt=148185176, fOption=14
    RETCODE = -1
    ERROR - Generating SQLException...
    SQLException: SQLState(24000) vendor code(0)
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
    at sun.jdbc.odbc.JdbcOdbc.SQLGetStmtOption(JdbcOdbc.java:3773)
    at sun.jdbc.odbc.JdbcOdbcResultSet.calculateRowCount
    (JdbcOdbcResultSet.java
    :5982)
    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 DBTest.<init>(DBTest.java:27)
    at DBTest.main(DBTest.java:18)
    Fetching (SQLFetchScroll), hStmt=148185176
    End of result set (SQL_NO_DATA)
    *Connection.createStatement
    Allocating Statement Handle (SQLAllocStmt), hDbc=148181752
    hStmt=148186208
    Setting statement option (SQLSetStmtOption), hStmt=148186208, fOption=6,
    vParam=0
    Setting statement option (SQLSetStmtOption), hStmt=148186208, fOption=7,
    vParam=1
    Registering Statement sun.jdbc.odbc.JdbcOdbcStatement@19c082
    *Statement.executeQuery (SELECT COUNT(*) FROM DDINUMBERS WHERE DDINUMBER =
    3554830
    7)
    *Statement.execute (SELECT COUNT(*) FROM DDINUMBERS WHERE DDINUMBER = 35548307)
    Free statement (SQLFreeStmt), hStmt=148186208, fOption=0
    Executing (SQLExecDirect), hStmt=148186208, szSqlStr=SELECT COUNT(*) FROM
    DDINUMBE
    RS WHERE DDINUMBER = 35548307
    RETCODE = -1
    ERROR - Generating SQLException...
    SQLException: SQLState(S0002) vendor code(208)
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid
    objec
    t name 'DDINUMBERS'.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:2494)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:334)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery
    (JdbcOdbcStatement.java:249)
    at sun.jdbc.odbc.JdbcOdbcResultSet.calculateRowCount
    (JdbcOdbcResultSet.java
    :6063)
    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 DBTest.<init>(DBTest.java:27)
    at DBTest.main(DBTest.java:18)
    ResultSet.finalize sun.jdbc.odbc.JdbcOdbcResultSet@4ac268
    ResultSet.finalize sun.jdbc.odbc.JdbcOdbcResultSet@216869
    *ResultSet.close
    C:\jdk1.3.1\bin>

    Hi,
    my suggestion: you can't use isBeforeFirst() on empty result set. Try following:
    rs = stmt.executeQuery(queryDdi);
    int count = 0;
    while (rs.next()) {
      count++;
      System.out.println("DdiNumber = "+rs.getString("DdiNumber"));
    if (count == 0) {
    JOptionPane.showMessageDialog(null, "> Ddi-number does not exist < ", "Validation of input fields", JOptionPane.ERROR_MESSAGE);
    }Best Regards,
    Martin

  • ODBC problems with Oracle 8.1.5 on Windows 2000

    Hi,
    I have got a problem when i configure ODBC on Windows 2000.
    When I test the driver with ODBC test driver, the programs doesn't respond when i use Oracle ODBC Driver first but responds when I use Microsoft Driver For Oracle first and then Oracle ODBC Driver.
    Then I have a system 5 error when I use ODBC with ASP.
    Is it Oracle 8.1.5 which is not compatible with Windows 2000 or a problem in Windows 2000 configuration ?
    Best regards
    Ronan

    I think I was having the same problem; programs attempting to connect w/ODBC (including ODBCTest) would hang. After downloading and installing a newer ODBC driver from oracle (for me 8.1.5.5 worked), I was able to connect. Hope this helps!
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Duclos Ronan ([email protected]):
    Hi,
    I have got a problem when i configure ODBC on Windows 2000.
    When I test the driver with ODBC test driver, the programs doesn't respond when i use Oracle ODBC Driver first but responds when I use Microsoft Driver For Oracle first and then Oracle ODBC Driver.
    Then I have a system 5 error when I use ODBC with ASP.
    Is it Oracle 8.1.5 which is not compatible with Windows 2000 or a problem in Windows 2000 configuration ?
    Best regards
    Ronan<HR></BLOCKQUOTE>
    null

  • JDBC performance problem with Blob

    Hi,
    I've some performance problem while inserting Blob in an Oracle
    8i database. I'm using JVM 1.17 on HP-UX 11.0 with Oracle thin
    client
    The table I used contains only two columns : an integer (the
    primary key) and a blob.
    First I insert a row in the table with an empty_blob()
    Then I select back this row to get the blob
    and finally I fill in the blob with the data.
    But it takes an average 4.5 seconds to insert a blob of 47 Kb.
    Am I doing something wrong?
    Any suggestion or hint will be welcome.
    Thanks in advance
    Didier
    null

    Don S. (guest) wrote:
    : Didier Derck (guest) wrote:
    : : Hi,
    : : I've some performance problem while inserting Blob in an
    Oracle
    : : 8i database. I'm using JVM 1.17 on HP-UX 11.0 with Oracle
    thin
    : : client
    : : The table I used contains only two columns : an integer (the
    : : primary key) and a blob.
    : : First I insert a row in the table with an empty_blob()
    : : Then I select back this row to get the blob
    : : and finally I fill in the blob with the data.
    : : But it takes an average 4.5 seconds to insert a blob of 47
    Kb.
    : : Am I doing something wrong?
    : : Any suggestion or hint will be welcome.
    : : Thanks in advance
    : : Didier
    : In our testing if you use blob.putBytes() you will get better
    : performance. The draw back we found was the 32k limit we ran
    in
    : to. We had to chunk things larger than that and make calls to
    : the append method. I was dissappointed in Oracle's phone
    support
    : on what causes the 32k limit. In addition the getBytes() for
    : retrieve doesn't seem to work. You'll have to use the
    : InputStream for that. Oh, and FYI. We ran into a 2k limit on
    : putChars() for CLOB's.
    the thin drivers currently use the package "dbms_lob" behind the
    scenes while the jdbc oci 815 drivers and higher uses the native
    oci calls which makes them much faster.
    there also is a 32k limit on pl/sql stored procedures/functions
    for parms.
    you may have run into that.
    null

  • JDBC TableModel problem with setValueAt

    Hello to everyone. I have problem when I change value at cell in Table. My model makes update in DB, but in GUI the change is not visible. The change gets visible only when I reopen the Table.
    public class CustomTableModel extends AbstractTableModel implements Serializable
        int                  dateTime = Types.DATE;
        Connection                con = null;
        ResultSet                  rs = null;
        ResultSetMetaData  rsMetaData = null;
        int                numColumns;
        String[]          columnNames = null;
        boolean           isUpdatable;
        Vector                   rows = new Vector();
        public CustomTableModel(Connection connect, ResultSet rset, String[] strl )
         try
             con = connect;
          String[] sNames = strl;
             rs = rset;
             rsMetaData = rs.getMetaData();
             numColumns = rsMetaData.getColumnCount();
             columnNames = new String[numColumns];
          int rowIndex;
          int columnIndex;
           if (rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE)
              isUpdatable = true;
             else
              isUpdatable = false;
             for (int i = 0; i < numColumns; i++)
        if (sNames==null){
              columnNames[i] = rsMetaData.getColumnLabel(i+1);
        else
          columnNames = sNames;
             while(rs.next())
              Vector tempRow = new Vector(numColumns);
              for (int i = 0; i < numColumns; i++)
                  switch(rsMetaData.getColumnType(i+1))
                  .............. TYPES....
             } // end for loop
              rows.add(tempRow);
             } // end while loop
         }My method setValueAt
    public void setValueAt(Object aValue, int rowIndex, int columnIndex)
         try
            Object oldValue = getValueAt(rowIndex,columnIndex);
             if (oldValue == null && aValue == null)
              return;
             // can use equals() only if oldValue is not null
             if (oldValue != null)
              if (oldValue.equals(aValue))
                  return;
             // JTable is 0 based while ResultSet is 1 based
             rs.absolute(rowIndex+1);
             updateResultSet(rs, aValue, rowIndex, columnIndex);
             rs.updateRow();
             con.commit();
             Vector aRow = (Vector)rows.elementAt(rowIndex);
                aRow.setElementAt(aValue, columnIndex);
           fireTableCellUpdated(rowIndex, columnIndex);
         catch (SQLException ex)
             ExceptionEvent event = new ExceptionEvent(this, ex.getMessage());
             fireExceptionGenerated(event);
             try
              con.rollback();
             catch (SQLException ex2)
              event = new ExceptionEvent(this, ex2.getMessage());
              fireExceptionGenerated(event);
         catch (Exception ex)
             ExceptionEvent event = new ExceptionEvent(this, ex.getMessage());
             fireExceptionGenerated(event);
        }Thanks in advance.

    import java.io.*;
    import java.sql.*;
    import java.text.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableModelDemo extends javax.swing.JFrame {
        public TableModelDemo() {
            initComponents();
            connectDatabase();
            CustomTableModel model = new CustomTableModel();
            model.init(conn,rs,null);
            jTable1.setModel(model);
        private void connectDatabase(){
            try{
                DriverManager.registerDriver(new com.sybase.jdbc2.jdbc.SybDriver());
            }catch (Exception ex){
                ex.printStackTrace();
            conn=null;
            try{
                conn = DriverManager.getConnection("jdbc:sybase:Tds:prdfs4:2638","dba","sql");
            }catch (Exception ex){
                System.out.println("Connection refused");
            try {
                if(conn!=null){
                    Statement stmt = conn.createStatement();
                    String query ="SELECT ANA_LED_BASE_FORGN_CURY, ANA_AXIS_CODE, ANA_ACC_NUM, ANA_LED_TXT FROM ana_ledger " +
                            "where CMPY_CODE='06-LV   ' and JRNL_CODE='SFA  ' and ANA_LED_DOC_NUM=0008170";
                    rs = stmt.executeQuery(query);
            } catch (SQLException sqe) {
                String message = sqe.getMessage();
                JOptionPane.showMessageDialog( null, message );
        private void initComponents() {
            jScrollPane1 = new javax.swing.JScrollPane();
            jTable1 = new javax.swing.JTable();
            jToolBar1 = new javax.swing.JToolBar();
            jButton1 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("change value at cell in Table");
            jScrollPane1.setViewportView(jTable1);
            getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
            jToolBar1.setFloatable(false);
            jButton1.setText("change value at cell in Table");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            jToolBar1.add(jButton1);
            getContentPane().add(jToolBar1, java.awt.BorderLayout.NORTH);
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width-790)/2, (screenSize.height-327)/2, 790, 327);
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
            String val = JOptionPane.showInputDialog("change value at cell in Table","TEST,1,1");
            String val2[] = val.split(",");
            jTable1.setValueAt( val2[0],Integer.parseInt(val2[1]),Integer.parseInt(val2[2]) );
        public static void main(String args[]) {
                    new TableModelDemo().setVisible(true);
        private javax.swing.JButton jButton1;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTable jTable1;
        private javax.swing.JToolBar jToolBar1;
        private ResultSet rs ;
        private Connection conn;
    class CustomTableModel extends DefaultTableModel implements Serializable {
        int                  dateTime = Types.DATE;
        Connection                con = null;
        ResultSet                  rs = null;
        ResultSetMetaData  rsMetaData = null;
        int                numColumns;
        String[]          columnNames = null;
        boolean           isUpdatable;
        Vector                   rows = new Vector();
        public void init(Connection connectToDatabase, ResultSet rset, String[] strl ) {
            try {
                con = connectToDatabase;
                String[] sNames = strl;
                rs = rset;
                rsMetaData = rs.getMetaData();
                numColumns = rsMetaData.getColumnCount();
                columnNames = new String[numColumns];
                int rowIndex=0;
                int columnIndex;
                if (rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE) {
                    isUpdatable = true;
                } else {
                    isUpdatable = false;
                for (int i = 0; i < numColumns; i++) {
                    if (sNames==null){
                        columnNames[i] = rsMetaData.getColumnLabel(i+1);
                    } else {
                        columnNames = sNames;
                while(rs.next()) {
                    Object[] rowData = new Object[numColumns];
                    addRow( rowData );
                    Vector tempRow = new Vector(numColumns);
                    for (int i = 0; i < numColumns; i++) {
                        if( rowIndex==0 ){
                            addColumn( columnNames[i] );
                        setValueAt( rs.getString(i+1), rowIndex, i );
                        //                    switch(rsMetaData.getColumnType(i+1))
                        //                    .............. TYPES....
                    } // end for loop
                    rows.add(tempRow);
                    rowIndex++;
                } // end while loop
            }catch(Exception ex){
                ex.printStackTrace();
        public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
            super.setValueAt( aValue, rowIndex, columnIndex );
            try {
                Object oldValue = getValueAt(rowIndex,columnIndex);
                if (oldValue == null && aValue == null) {
                    return;
                // can use equals() only if oldValue is not null
                if (oldValue != null) {
                    if (oldValue.equals(aValue)) {
                        return;
                // JTable is 0 based while ResultSet is 1 based
                //            rs.absolute(rowIndex+1);
                //            updateResultSet(rs, aValue, rowIndex, columnIndex);
                //            rs.updateRow();
                //            con.commit();
                //        Vector aRow = (Vector)rows.elementAt(rowIndex);
                //        aRow.setElementAt(aValue, columnIndex);
                //            fireTableCellUpdated(rowIndex, columnIndex);
                //        } catch (SQLException ex) {
                //            ExceptionEvent event = new ExceptionEvent(this, ex.getMessage());
                //            fireExceptionGenerated(event);
                //            try {
                //                con.rollback();
                //            } catch (SQLException ex2) {
                //                event = new ExceptionEvent(this, ex2.getMessage());
                //                fireExceptionGenerated(event);
            } catch (Exception ex) {
                //                    ExceptionEvent event = new ExceptionEvent(this, ex.getMessage());
                //                    fireExceptionGenerated(event);
    }

  • Jdbc connectivity problem with mySql

    Hello,
    Could anyone plz help me in solving this problem-
    there are total 3 databases on our site. 2 are old and the 3rd one we created after we installed the new version of mysql(4.1) . Now, we can connect thru over jsp pages to the old databases but when we connect it to the new (3rd ) one it throws the following exception-
    �Java.sql.SQLException: Due to underlying Exception : ArrayIndexOutOfBoundsException.44 Server connection failure during transaction. Attempted reconnect 3 times. Giving up �
    Though the data in the new database is same as in the first database becoz it was just created for testing purpose.
    Is this issue anything to do with the privleges in mysql .plz help........
    Regards

    is this problem related to privleges as i just checked my phpAdmin and there i found this warning-
    �Warning: Your privilege table structure seem to be older than this MySQL version!
    Please run the script mysql_fix_privilege_tables that should be included in your MySQL server distribution to solve this problem! �
    plz HELP

Maybe you are looking for