Select * from table not working with Oracle OBDC driver

Hello,
In our web development we have been using the MS ODBC for Oracle
driver to connect to our Oracle db. We decided to try the
Oracle ODBC driver because it supports the commandTimeout
property in ASP which the MS driver does not. The problem I'm
running into now is that all of our select * from table
statements appear not to be working. The Oracle ODBC driver
version we are using is ver 8.00.05.00. Is there something that
I'm not doing properly? If I take the same select * from table
statement and name the columns, I dont get any error. Otherwise
I'm getting a Subscript out of range error. It seems strange to
me that this driver would not support a select * from table
statement (which I''m told is the case by another developer
here).
Is there something I'm missing?
Thanks,
Pete

I'm positive I have a connection. Otherwise I wouldn't get a
response when I name the columns instead of using *.
There must be something else that I'm missing or doing wrong.
I've actually been looking into alternative ODBC drivers to see
if I have the same problems but none that I have found support
commandTimeout.
Any other ideas?

Similar Messages

  • PreparedStatement not working with Oracle

    Hi All,
    I am using preparedStatement in my JDBC code to fetch/insert values from oracle9i database.
    I am checking condition like if a given record does not exist then insert it else update it.
    First time it works when there is no row in database, however for subsequent run it's not able to return me the result though that row exist in database and this resulting in DuplicateKeyException becuase it try to create the row in db again.
    The code is working fine for MySQL DB2 and SQLServer but doesn't work in case oracle 9i
    Here is mycode
    //problem is here 1st time it works next time it is not retunring true though record is there in DB.
    if(isItemExist("1","CORP"))
    updateItem("1","CORP","DESC1");
    else
    insertItem("1","CORP","DESC1");
    public boolean isItemExist(String itemid, String storeid)
    String FIND_SQL = "SELECT item_desc from item where item_id = ? and store_id = ? ";          
    c = utils.getConnection();
    ps = c.prepareStatement();
    int i = 1;
    ps.setString(i++, storeid);
    ps.setString(i++, itemid);
    rs = ps.executeQuery();
    if(rs.next()){
         return true;
    utils.close(c, ps, rs);
    else{
         return false;
    utils.close(c, ps, rs);
    public void createItem(String itemid, String storeid, String item_desc)
    String INSERT_SQL = "INSERT INTO item(item_id,store_id,item_desc)values(?, ?, ?)";
    c = utils.getConnection();
    ps = c.prepareStatement();
    int i = 1;
    ps.setString(i++, itemid);
    ps.setString(i++, storeid);
    ps.setString(i++, item_desc);
    ps.executeUpdate();
    utils.close(c, ps, null);
    public void updateItem(String itemid, String storeid, String item_desc)
    String INSERT_SQL = "UPDATE item SET item_desc = ?, store_id=? WHERE item_id = ?";
    c = utils.getConnection();
    ps = c.prepareStatement();
    int i = 1;
    ps.setString(i++, item_desc);
    ps.setString(i++, storeid);
    ps.setString(i++, itemid);
    ps.executeUpdate();
    utils.close(c, ps, null);
    Kindly suggest what's wrong with code. because same code works with other databse like SQL Server, MySQL but it is not working with oracle9i.

    if(isItemExist("1","CORP"))
    updateItem("1","CORP","DESC1");
    else
    insertItem("1","CORP","DESC1");
    String FIND_SQL = "SELECT item_desc from item where item_id = ? and store_id = ? ";
    ps.setString(i++, storeid);
    ps.setString(i++, itemid);
    String INSERT_SQL = "INSERT INTO item(item_id,store_id,item_desc)values(?, ?, ?)";
    ps.setString(i++, itemid);
    ps.setString(i++, storeid);
    ps.setString(i++, item_desc);
    String INSERT_SQL = "UPDATE item SET item_desc = ?, store_id=? WHERE item_id = ?";
    ps.setString(i++, item_desc);
    ps.setString(i++, storeid);
    ps.setString(i++, itemid);My first guess, looking at the above snippets, would be that the item_id field is a number and not a string and so you should be calling ps.setInt instead of ps.setString when setting that parameter.
    This is only a guess, however, since you have not posted what the actual error is, which will probably give a hint to what the actual error is.

  • "Next" and "Previous" functionality on UIX tables not working with 10g

    With new release of JDeveloper(10G), the "Next" and "Previous" navigation buttons/links on UIX tables are not working. I tried different approaches:
    1. It does not work with Data Controls built from Java Beans or from TopLink.
    2. I tried without using Data Controls and it still does not work.
    I shows "Next" and "Previous" buttons on the page. But it shows all records on the page rather then showing limited records. Say for example if the block size is 5 and total number of records are 15, it shows all 15 records in the table but the "next" and "Previouds" button would say "1-5 of 15".
    Did any of you observe the same behaviour?

    Hi Shital -
    Thanks for the additional info...
    When I said that the total number of records is 15, I
    meant that my tableData's DataObjectList contains 15
    entries. (In case of DataControls you don't even use
    DataObjectList, but for my non data control
    applications I used DataObjectList). You are saying
    that If I want to display only 5 records per page
    then I will need to provide a DataObjectList with
    five items. Then for next five records from 6-10 I
    will have to program in such a way that my method
    call returns 6-10 records.That's correct. In the case where you are explicitly providing data to the table via a DataObjectList, you need to feed the data to the table in page size blocks - and you also need to handle the table's goto event to scroll the table to the next/previous block of data.
    In previous version of
    UIX(2.1.7) I never had to program for next and
    previous buttons. UIX tables used to take care of
    that. That's why I am so surprised.It sounds like you must have been using the <bc4j:table> component. Is that the case?
    Getting back to your original issue...
    1. It does not work with Data Controls built
    from Java Beans or from TopLink.I believe that this is a bug in the preview release - and I'm fairly sure this will be addressed by production. In production, ADF should automatically handle wiring up table scrolling for you when binding your table to a data control - whether the data control is implemented via JavaBeans, Toplink, or BC4J. I believe that in the preview release, scrolling only working when binding to a BC4J data control.
    Andy

  • Oracle 11g XE not working with oracle BI publisher 10g after enabling ACL

    Hello,
    I previously work with oracle 10gXE and Oracle BI publisher 10g and it work fine. now i install oracle 11g XE and try to configure it with oracle Bi Publlisher, it show this error
    "ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1324 ORA-12570: TNS:packet reader failure" after runing the ACL package to neable network service.
    on the database.
    Please can any body tell be why this is not working. Tanx.

    You'll need to add the apex engine owner to the ACL (Access Control List). Depending on your version of apex the user name varies. i.e. 4.0 is APEX_040000
    See Joel's blog for info about the ACL and APEX.
    [http://joelkallman.blogspot.com/2010/10/application-express-network-acls-and.html]

  • Recovery did not work with new hard drive

    The original Toshiba HD(250G, sata1) of my laptop( ) crashed.
    I bought new one (320G, sata 2, Western digit )
    The problem is that, when I tried to use the recovery CD that I used to use it with old HD before, it did not work with this new HD well!?
    After cd1 and cd2 finish installing it ask to take it out then restart, I do so, but when it comes to setup setting of windows.
    An error message come out says " Windows Setup could not configure Windows on this computer’s hardware”
    It restart and says again " Windows could not complete the installation. To install Windows on theis compuiter, restart the installation."
    I have been trying to solve this a lot, but no way
    I tried what in this link, but it drive me with another problem http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/windows-could-not-complet...
    I hope that I get the right thing to do, from ur forum by this post.
    Thanks a lot

    Did you folks search here for "advanced format drive"?    People have had numerous weird problems with the new advanced format hard drives in older Toshibas.    I can't look up all the threads for you.    But here is one:
    http://forums.toshiba.com/t5/System-Recovery-and-Recovery/Recovery-won-t-work-on-new-upgraded-hardri...

  • Have Thundbolt on my mac will not work with my thunderbolt drive

    I have a port on my Imac, but it will not work with my ThunderBolt Drive

    Agree on cables, you don't want something generic when it comes to thunderbolt in my experience. It's thos accessories that add up and they are profitable for a reason. Cheap isn't always good with accessories.

  • Select * into Table1 from Table not working

    Hi,
    How to copy data from one table to other new table using select * into statement.
    I am getting missing keyword error when I use the statement
    select * into Table1 from Table
    Thanks a lot in advance.
    Regards,
    Praveen

    the syntax is
    INSERT INTO table1 SELECT * FROM table2;

  • IPlanet J2EE application not working with oracle 9i but working with 7.3

    We are in a process of upgrading database from oracle 7.3 to 9i.
    We have a working application running on iPlanet Application Server with oracle 7.3 as database. We are using iPlanet Application Server's connection pooling. Our JDBC driver is classes111.zip.
    After upgrading to 9i, our application doesnt work. When I try to run a test application that uses single select statement, this the error I get: java.sql.SQLException: Invalid URL: Driver type not specified
    SQL*PLUS works fine. I havent upgraded oracle client. Do I need to upgrade the JDBC driver or oracle client?
    Any suggestions? iAS version is 6.5.

    If you are new to JSF, then I'd try and simplify the environment in which you are working as the first step to achieving a successful outcome.
    JSF 1.2 is a certified and well tested component of WLS, so we know it works. I'm not sure of the effect of all those additional modules you are adding in there -- it appears as if you have gotten a Faces implementation instantiated, but there could be some form of version difference/conflict since it can't find a method its looking for.
    Using Oracle Enterprise Pack for Eclipse (http://www.oracle.com/technology/software/products/oepe/oepe_11115.html) you can build yourself out a pretty simple JSF application to get started from and deploy it to a WLS server. This would remove all the additional libraries you currently have, provide you with a bundled applicaton to deploy and give you a pretty good environment from which you can learn and experiment with JSF.
    -steve-

  • Can only add music with Autofill from Library (not working with playlists)

    I can only add music using the Autofill feature and it will only work when the main music library is selected. Autofill does not work when a playlist is selected and I can not add music directly by dragging songs from a library or playlist as described in the owner's manual.
    Is there something wrong with iTunes, the iPod or is this user error?

    Hi Steve,
    You're right it's the same for me.
    I don't know as you mentionned whether it is an user error or not but I've got 2 iPods now, one is 60 Go color display (60Go) and the other received yesterday is 2G iPod Shuffle (Clipod). I can't drag songs from 60Go nor to iTunes Library neither to Clipod Music. The autofill function works only from iTunes Library where I've got 5 songs only (new MacPro), somebody knows how to export 60Go music to iTunes Library ?
    Thanks,
    Peloche
    MacPro 2.66, 6GB, 1.7TB; Mini G4, 1.45, 1GB;iPod 60 GB; 30" & 20" ACD; Apple IIC   Mac OS X (10.4.8)   X1900XT

  • Netbeans not working with Oracle Waveset 8.1.1!!!!

    We have recently done a test upgrade to Oracle Waveset 8.1.1 and discovered that we can no longer use Netbeans to do further development. We are trying to use Netbeans 6.8 with the 8.1 connector downloaded from the open source java website, which is the last official one available.
    When creating a new IDM project you receive an error saying:
    "The version of the server you are attempting to connect to, 8.1.1,does not match that of the IDE Compatability Bundle for your project,8.1".
    We contacted Oracle and they have advised that we cannot upgrade to 8.1.1, as there is no supported connector. We are getting further advice on this as this is quite bad if its true.
    Is anyone else using Netbeans 6.8 with Oracle Waveset 8.1.1 successfully and if so can you advise how you went about configuring it?

    Update:
    We upgraded our production environment with patch 14 this last Thursday.
    The "sample/ide-bundle.zip" is not located in the download but instead was updated during the patching process and may be found at $WSHOME/sample/ide-bundle.zip.
    After moving the zip to my local machine I was able to configure a (remote) IDM project in Netbeans without receiving an error.
    My problem has been resolved.
    -IDMxml

  • GetObject(int, Map) not working with oracle JDBC

    I'm using Oracle and I'd like to get Date fields as Timestamps since an Oracle date column includes time. I'm trying to use getObject(int, Map) to map the types to Java objects, but it's not working. This is my code:
         public static final HashMap oracleMap = new HashMap();
         static{
              try{
                   oracleMap.put( "DATE", Class.forName("java.sql.Timestamp") );
                   oracleMap.put( "NUMBER", Class.forName("java.math.BigDecimal") );
                   oracleMap.put( "VARCHAR2", Class.forName("java.lang.String") );
                   oracleMap.put( "CLOB", Class.forName("java.sql.Clob") );
                   oracleMap.put( "LONG", Class.forName("java.lang.String") );
              }catch(Exception e){
                   IllegalStateException ise = new IllegalStateException("Oracle type mapping failed.");
                   ise.initCause(e);
                   throw ise;
         }And
                        BASE.println("rs.getClass().getName(): "+rs.getClass().getName());                                        
                        BASE.println("rs.getMetaData().getColumnTypeName(i): "+rs.getMetaData().getColumnTypeName(i));
                        if(rs.getClass().getName().startsWith("oracle")) valObj = rs.getObject(i, DOMTools.oracleMap);                    
                        else valObj = rs.getObject(i);                    
                        BASE.println("valObj.getClass().getName(): "+valObj.getClass().getName());Here's a snippet of my output that illustrates the code not working:
    rs.getClass().getName(): oracle.jdbc.driver.OracleResultSetImpl
    rs.getMetaData().getColumnTypeName(i): DATE
    valObj.getClass().getName(): java.sql.Date
    Anyone know if this is a driver issue? Anyone had luck doing this with Oracle?
    Thanks.

    Well, I'd like it to be java.sql.Timestamp instead of
    java.sql.Date. My actual type is an oracle "DATE".
    Are you saying the Map key for this would be
    "TIMESTAMP" and that by default it maps to
    java.sql.Date? Doesn't seem like that makes sense.I am saying that "TIMESTAMP" is not an oracle value but is instead a JDBC value. Thus it is up to to the driver, not you, to determine what oracle types map to the JDBC type.

  • Setting Out Of Office from Outlook not working with exchange 2010

    Hi 
    We have an exchange 2010  server with 2 load balanced CAS server and Mailbox servers in a DAG.  We have a few domain
    names accepted (will call it firstdomain.com and seconddomain.com)  but only one is in certificate (firstdomain.com).
    The issue is - when user with default email @seconddomain.com try to set “Out Of Office” from outlook (2010 with all service
    packs and updates) he is getting “ Your Out of Office settings cannot be displayed, because the server is currently unavailable. Try again later”  where
    setting it from webmail works fine and setting it from outlook for users with @firstdomain.com reply address works fine.
    we have both internal and external urls for all virtual directories set to external
    host address (https://mail.firstdomain.com
      etc). All the users are on intranet with local ip subnets (sites connected via vpns ), all the routing is in place and DNS points to correct ip addresses.
    Autodiscover works fine (tested in outlook ) and giving correct address for OOF link
    ( https://mail.firstdomain.com/ews/exchange.asmx)
    wich opens fine if entered into address bar in IE so its NOT AN AUTODISCOVER issue .
    I enabled  logging in outlook and thats what I am getting in there:
    We have an exchange 2010  server with 2 load balanced CAS server and Mailbox servers in a DAG.  We have a few domain
    name accepted (will call it firstdomain.com and seconddomain.com)  but only one is in certificate (firstdomain.com).
    The issue is - when user with default email @seconddomain.com try to set “Out Of Office” from outlook (2010 with all service
    packs and updates) he is getting “ Your Out of Office settings cannot be displayed, because the server is currently unavailable. Try again later”  where
    setting it from webmail works fine and setting it from outlook for users with @firstdomain.com reply address works fine.
    we have both internal and external urls for all virtual directories set to external
    host address (https://mail.firstdomain.com
      etc). All the users are on intranet with local ip subnets (sites connected via vpns ), all the routing is in place and DNS points to correct ip addresses.
    Autodiscover works fine (tested in outlook ) and giving correct address for OOF link
    ( https://mail.firstdomain.com/ews/exchange.asmx)
    wich opens fine if entered into address bar in IE so its NOT AN AUTODISCOVER issue .
    I enabled  logging in outlook and thats what I am getting in there:
    1600       0x49763D20        02/02/15 16:50:44           
    +++++++++++++++++++++++++++++++
    1600       0x49763D20        02/02/15 16:50:44           
    OWINHTTP SEND HTTP REQUEST BEGIN
    1600       0x49763D20        02/02/15 16:50:44           
      Profile=Outlook
    1600       0x49763D20        02/02/15 16:50:44           
      [email protected]
    1600       0x49763D20        02/02/15 16:50:44           
      URL=https://mail.firstdomain.com/ews/exchange.asmx
    1600       0x49763D5F        02/02/15 16:50:45           
    GetLastError=0; httpStatus=401.
    1600       0x49763D5F        02/02/15 16:50:45           
    OWinHtpp disabled auth schemes:
    1600       0x49763D5F        02/02/15 16:50:45           
    <NONE>
    1600       0x49763D5F        02/02/15 16:50:45           
    OWinHtpp supported auth schemes:
    1600       0x49763D5F        02/02/15 16:50:45           
    Negotiate
    1600       0x49763D5F        02/02/15 16:50:45           
    NTLM
    1600       0x49763D5F        02/02/15 16:50:45           
    Basic
    1600       0x49763D5F        02/02/15 16:50:45           
    OWinHttp attempting Auto-Negotiate with Desktop Credentials.
    1600       0x49763D5F        02/02/15 16:50:45           
    OWinHttp USING pcreds->dwAuthScheme:
    1600       0x49763D5F        02/02/15 16:50:45           
    Negotiate
    1600       0x49763D9D       02/02/15 16:50:45           
    GetLastError=0; httpStatus=500.
    1600       0x49763DAD       02/02/15 16:50:45           
    OWINHTTP SEND HTTP REQUEST END
    1600       0x49763DAD       02/02/15 16:50:45           
    Last thing - we are using proxy server and with proxy off it works fine although all
    possible exchange server hosts/domains/ip addresses excluded from proxy.  
    Aside from obvious question - what can be wrong and what to test next, another question
    is - how can I check/monitor setting OOF on server side (log files etc)?
    Last thing - we are using proxy server and with proxy off it works fine although all
    possible exchange server hosts/domains/ip addresses excluded from proxy.  
    Aside from obvious question - what can be wrong and what to test next, another question
    is - how can I check/monitor setting OOF on server side (log files etc)?
    Thanks

    Hi,
    According to your description, I understand that Outlook client with second domain name cannot use OOF setting and get an error “Your Out of Office settings cannot be displayed, because the server is currently unavailable.”  However OWA works fine.
    If I misunderstand your concern, please do not hesitate to let me know.
    I want to double confirm whether all account or some special user experience this question.
    Would you please try to reconfigure Outlook profile in other Computer, Outlook version and return the results?
    If this issue only appeared on Outlook 2010, please refer to below link to troubleshooting:
    https://support.microsoft.com/kb/2596516?wa=wsignin1.0
    Please try to run ExBPA to test OOF to get more details about this question. Additional, I find a similar thread about your question, for your reference:
    https://social.technet.microsoft.com/Forums/exchange/en-US/81ebc1de-c899-4097-b224-a0e4b33e4162/users-cant-open-out-of-office-assistant
    Best Regards,
    Allen Wang

  • How to set SunOne IDE to work with Oracle thin driver

    I am new to the SunOne IDE. I am trying to use the JDBC wizard to generate a form to work with an Oracle table. I want to use the ORacle thin driver but I am not sure how I can tell the IDE where its located. Can someone help? Thanks.

    In the explorer window select "RUNTIME".(Bottom of window tabbed pane)
    Expand "DATABASES"
    Expand "DRIVERS"
    Scrolldown and you'll see Oracle thin - click on that and set properties.
    Then right click "Oracle thin" click "connect using..."
    From here/there you should be able to view all tables you have access to view..etc.

  • Recovery discs do not work with new hard drive

    Hi I have come here desperately seeking help as I am not too knowledgeable with the workings of computers and I have spent an incredible amount of time just trying to get my laptop to some level of functionality.  I purchased a HP Envy and it had a corrupt hard drive which would not work from day one, laptop was new.  After a year of constant pressure on HP they finally decided to replace it and let me choose any laptop so I went with the Beats Envy 14 as it was the best one offered from the selection.  Low and behold the thing would not work properly from day one, again my brother who is much more of an expert said that there was definitely a hard drive issue so for the past 3 years I have put up with a computer that constantly crashes with BSOD, where I have lost data on numerous occasions (only so often I can back up), that I have had to constantly reset the thing using HP recovery discs, and that generally cannot cope when performing multiple tasks.   HP are most certainly shocking builds from my experience.  Then just last week the hard drive just craps itself and the laptop no longer will boot up.  I took it to a guy to get it at leYst working again so he has installed a new hard drive but with an old version of Windows 7.  I want to go back to the Windows version I was akin to on the HP recovery disk , and essentially have it all set up as before except for now having a workable hard drive however I get the message:  "This computer is not supported by the System Recovery Discs.You will not be able to continue to recover this system with these discs.Error: 0100 - 3385 - 3078" I also tried out of interest to load my old Windows 7 disc I had and XP but had no success.  Tried booting from startup etc and various things suggested on help forums.  Please tell me I am not stuck with this version of windows.  Whilst the discs included Windows 7 it was a totally different version, this home premium one is terrible. Any help/advice would be gratefully received. Thanks

    no they were both 500gb. I read about that already, I heard about creating a partition for recovery etc but this is all a bit above me , as I said I am not very technical when it comes to the working of a computer.  These discs worked perfectly before but now with the new hard drive will not load at all.  I essentially hate the Windows Home Premium verions the guy who fixed it put on, whilst the discs had Windows 7 on them the icons were way smaller, the desktop neater, the buttons different, everything was a lot more modern and I was used to it.  This version looks like something from the 90s, have to constantly adjust size of Mozilla when browsing as it is huge.  I have my own version of Windows 7 on another disc but the hard drive will not let it load either........considering waiting for Windows 10 but again unsure if this new hard drive will even let that update Thanks

  • Does multilingual work with Oracle oci8 Driver? I am facing problems with oci8 while thin driver works fine ...

    Hi, I am currently working on iPlanet 6.0 SP4 with oracle 8.1.6. I am planning to make my application language independent. while testing I figured out that if i use oci8 driver or oracle, it doesn't support other language characters while the thin driver supports fine. Can anybody help me regarding this? Is this a bug, or some possible configuration issue? Has somebody came across this problem before? How do i go about it ?

    We faced same issue. Looks like the native driver does not support the automatic data encoding/decoding from/to database. You can always workaround this by reading everything as byte stream and then by letting java handle the encoding/decoding. But we decided to use type4 thin driver which does this automatically if you set the content type. Anyway we are told that later versions of IAS may not support native drivers, so if you are serious about multi language shift to type4 thin drivers now itself.

Maybe you are looking for