Query with column rename not working! (SQLServer/JDBC-ODBC bridge)

Hi,
I was wondering if anybody could help. I am translating some stuff from ASP to JSP and ran into an SQL query that goes like this:
String SQLQuery = "SELECT myTable.myColumn renamedColumn FROM myTable";
which is perfectly legal in SQL Server. I get the stuff from myTable, no problem, and the column's name is locally indeed renamedColumn.
Under the sun.jdbc.odbc.JdbcOdbcDriver, however, trying to do something like:
string myResult = results.getString("renamedColumn");
throws an SQL exception with the message "Index not found".
And if I don't rename the column and try:
myResult = results.getString("myTable.myColumn");
also gives the same problem.
Anybody know what to do?
[P.S, the reason why I have to rename my column is because I have two tables with an identical column name and need both for a search page]

Try retrieving by index instead of column name:
E.G.
string myResult = results.getString(1);

Similar Messages

  • Refresh Query with variable is not working

    I have issue with my query.
    0customer -Property (key and text) and Selection parameter
    When I place 0customer in the filter area and save the query execute the query and refresh the query I am able to change the customer number parameter values.
    Variable has option  Can be changed during query execution. Filter value is also not displaying in the report
    When I move 0customer in the  Row area and save the query -first time it is displaying the selection parameter values and when you hit refresh it will refresh the same query .but it is not populating the selection parameter .
    advance thx

    You can display values& texts for variables using menu button where you can display the text elements.
    Regards
    Pradip

  • Formula Columns are not working in Reports 10g

    Hi,
    We converted the reports developed in Reports 6i to Reports 10g. When we run the report in Reports 10g Builder everything works fine. But when we deploy the same report in Oracle Application Server and invoking the report the formula columns are not working ie., the fields/ placeholder columns which are based on the formula column are not displaying any values in the report.
    Please, someone help us in this regard.
    Thanks & Rgds,
    M T

    What version of Reports do you use..???
    Greetings...

  • HT4235 iPod nano 6th generation, syncing with audiobooks does not work now, had been working.  Sync test says:  No iPod touch, iPhone, or iPad found.  Connectivity test OK, no physical problems, iTunes shows the iPod.  Any clues what to do?

    iPod nano 6th generation, syncing with audiobooks does not work now, had been working.  Sync test says:  No iPod touch, iPhone, or iPad found.  Connectivity test OK, no physical problems, iTunes shows the iPod.  Any clues what to do?

    Hmm.. Thank you for the response.
    Have you tried using the iPod with another user account or computer, to help narrow down whether the problem lies with the computer, account, or the iPod itself?
    Maybe try reformatting it, using the tools provided by Windows. Instructions on how to reformat your iPod can be found in this article.
    http://www.methodshop.com/gadgets/ipodsupport/erase/index.shtml
    B-rock

  • Brand new Mac user help please! How do you connect a 17" monitor to the MacBook? I have the monitor plugged into the Mac, but the F8 that I am used to with PC does not work. Please help. Thanks.

    Brand new Mac user help please! How do you connect a 17" monitor to the MacBook? I have the monitor plugged into the Mac, but the F8 that I am used to with PC does not work. Please help. I am getting lots of spelling errors as the MacBook laptop screen is too small. Thank you so much! .

    Contentmom6 wrote:
    Brand new Mac user help please! How do you connect a 17" monitor to the MacBook? I have the monitor plugged into the Mac, but the F8 that I am used to with PC does not work.
    Normally, you just connect the monitor to the MacBook using a VGA adaptor that you can buy from an Apple Store.  Now try System Preferences > Displays > Detect Displays.  You should now be able to select a display mode for the monitor.  If it still doesn't work, then I'd check that everything is properly connected.  I've had problems with colours disappearing due to a faulty connection in the VGA adaptor.
    Bob

  • FIND with MATCH OFFSET not working

    Hi,
    I have a statement:
    FIND '/' IN <ls_data_package>-/bic/zbib_sysn MATCH OFFSET off2.
    this works in all the case except for when <ls_data_package>-/bic/zbib_sysn = SSULTANA-VMC/.
    (i.e. when /bic/zbib_sysn = USERID-VMC/, here SSULTANA is the user ID)
    *In this case off2 = .
    Value of sy-subrc is 0 after this statement is executed
    Can some one please point out what I am doing wrong.
    Thank you,
    CD
    Edited by: CSD . on Sep 26, 2008 9:53 PM

    >FIND with MATCH OFFSET not working  
    Most unlikely.  More likely is that it isn't doing what you think it should be doing.  Or you're using it incorrectly!
    I can't really follow what your problem is.  I assume you mean that you are getting off2 with value 0, when /bic/zbib_sysn contains USERID-VMC/
    Can you be a little clearer in what the issue is?
    DATA: off2 TYPE i.
    FIND '/' IN 'this string /' MATCH OFFSET off2.
    WRITE: / sy-subrc, off2.
    This little program returns 0 and 12 
    matt

  • I am having trouble with my speakers not working while online in particular on windows.My audio works when playing audio files

    I am having trouble with my speakers not working while online particular on facebook. My audio works when playing audio files.

    Hi,
    Did it happen all the time or sometime?
    Please check online browser status:
    Click Volume icon in the taskbar, click Mixer link button as below:
    If it's fine, follow this guide to run troubleshooter to detect and fix the issue:
    Tips for fixing common sound problems
    http://windows.microsoft.com/en-in/windows/tips-fixing-common-sound-problems#tips-fixing-common-sound-problems=windows-7
    Meanwhile, this similar thread also could be referred:
    https://social.technet.microsoft.com/forums/ie/en-US/a4a1cfe5-93a5-4c0b-9bf6-f7db0304f2ba/no-sound-on-youtube-or-any-other-webpage
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Serial number provided with download does not work, now what?

    serial number provided with download does not work, now what?

    Chrish29593217 you are welcome to contact our directly at Contact Customer Care.  What Adobe software title are you facing difficulties with?

  • TS3297 i bot a 3g iphone 2nd hand and it is trobleing a lot with os and not working plese help me

    i bot a 3g iphone 2nd hand and it is trobleing a lot with os and not working plese help me

    The following guide gives information on how to sync ringtones from your computer to the phone. The reference section at the bottom of the quide also gives instructions on how to convert a song to a ringtone. https://discussions.apple.com/docs/DOC-3792

  • [svn] 4323: Bug: LCDS-544 - Scenario where two components have seperate channel sets with overlapping channels not working .

    Revision: 4323
    Author: [email protected]
    Date: 2008-12-15 19:23:10 -0800 (Mon, 15 Dec 2008)
    Log Message:
    Bug: LCDS-544 - Scenario where two components have seperate channel sets with overlapping channels not working.
    QA: Yes
    Doc: No
    Checkintests Pass: Yes
    Details:
    * Hunting to a new channel within a channelset never triggered a disconnect from the previous channel(s). This isn't a problem in general, but does becomes a problem when an app defines two distinct channelsets containing at least one shared channel at the head of the list. In this case, the first channelset hunts past it and connects on a later channel. But when the second channelset hunts through (triggering a connect fault when it hits that initial shared channel that can't connect), the fault is processed by the first channelset as well (incorrectly).
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-544
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as

    Running the script by python2 solves it for me:
    su - mythtv -c "nice -n 19 python2 /usr/bin/tv_grab_nl_py --output ~/listings.xml"
    Best regards,
    Cedric

  • Webi report on OLAP Bex query -  Cost element Hierarchy not working Drill down

    Hello,
    We have a BO report on Bex query, Not on universe, we have a Hierarchy for Cost Element Group, and we are expecting the Drill down functionality for that in BO report, but it does not.
    Webi report on OLAP Bex query -  Cost element Hierarchy not working Drill down
    Any pointers how to do it please
    Thanks
    Krishna

    Hi,
    WebI reports on BEx source don't use same Drill feature as other sources, it's replaced by expland/collapse of hierarchy nodes (documented in WebI user guide in § "24.1 Drill defined"). This means you have to create query which selects all hierarchy sub-tree you plan on exploring later in report, otherwise if no data is available under a node there will be no '+/-' sign to visit this part of tree.
    You could try first to select "All members" from hierarchy in QueryPanel and see if behavior in report suits your needs. Then you should restrict hierarchy member selection to what's really needed to avoid performance issues.
    Regards,
    Loic

  • I have downloaded skype, but after synchronizing with itunes skype not working, why?

    i have downloaded skype, but after synchronizing with itunes skype not working, why?  when I was synchronizing I believe there was some message in itune saying software not backed up or somethin to that effect.

    Thanks for your response.
    However, I did not find any solution to my problem.
    in my phone the skype application skype is not opening up, same is the caseiwth mobile voip. Both these applications were downloaded last night and it worked then, but not working now.
    Thanks in advance for anyone willing to help. I am new to the iphone.

  • Hello, all of a sudden I fell down my system and completely erased all bookmarks. Your progress with restoration does not work, send me ansver,please

    Hello, all of a sudden I fell down my system and completely erased all bookmarks. Your progress with restoration does not work, write me of bookmarks could not be loaded. Please advice on everything because I came and they seriously need it.

    Did your computer crash or did Firefox crash causing the loss of the bookmarks?
    You can check for problems with the places.sqlite database file in the Firefox Profile Folder.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file
    See also:
    *http://kb.mozillazine.org/Lost_bookmarks
    *http://kb.mozillazine.org/Firefox_crashes
    *https://support.mozilla.org/kb/Firefox+crashes

  • JDBC-ODBC Bridge to SPSS data files - Result Set Type is not supported

    Hello,
    As mentioned in the subject I am trying to read SPSS data files using the SPSS 32-Bit data driver, ODBC and the JDBC-ODBC Bridge.
    Using this SPSS Driver I manged to read the data directly into an MS-SQL Server using:
    SELECT [...] FROM
    OPENROWSET(''MSDASQL.1'',''DRIVER={SPSS 32-BIT Data Driver (*.sav)};DBQ=' SomePathWhereTheFilesAre';SERVER=NotTheServer'', ''SELECT 'SomeSPSSColumn' FROM "'SomeSPSSFileNameWithoutExt'"'') AS a
    This works fine!
    Using Access and an ODBC System DNS works for IMPORTING but NOT for LINKING.
    It is even possible to read the data using the very slow SPSS API.
    However, when it comes to JDBC-ODBC the below code does only work in part. The driver is loaded successfully, but when it comes to transferring data into the resultset object the error
    SQLState: null
    Result Set Type is not supported
    Vendor: 0
    occurs.
    The official answer from SPSS is to use .Net or to use their implementation with Python in their new version 14.0. But this is obviously not an option when you want to use only Java.
    Does anybody have experience with SPSS and JDBC-ODBC??? I have tried the possible ResultSet Types, which I took from:
    http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad/rjvdsprp.htm
    and none of them worked.
    Thank you in advance for your ideas and input & stay happy!
    Here the code without all the rest of the class arround it:
    // Module:  SimpleSelect.java
    // Description: Test program for ODBC API interface.  This java application
    // will connect to a JDBC driver, issue a select statement
    // and display all result columns and rows
    // Product: JDBC to ODBC Bridge
    // Author:  Karl Moss
    // Date:  February, 1996
    // Copyright: 1990-1996 INTERSOLV, Inc.
    // This software contains confidential and proprietary
    // information of INTERSOLV, Inc.
    public static void main1() {
      String url   = "jdbc:odbc:SomeSystemDNS";
      String query = "SELECT SomeSPSSColumn FROM 'SomeSPSSFileName'";
      try {
        // Load the jdbc-odbc bridge driver
        Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
        DriverManager.setLogStream(System.out);
        // Attempt to connect to a driver.  Each one
        // of the registered drivers will be loaded until
        // one is found that can process this URL
        Connection con = DriverManager.getConnection (url);
        // If we were unable to connect, an exception
        // would have been thrown.  So, if we get here,
        // we are successfully connected to the URL
        // Check for, and display and warnings generated
        // by the connect.
        checkForWarning (con.getWarnings ());
        // Get the DatabaseMetaData object and display
        // some information about the connection
        DatabaseMetaData dma = con.getMetaData ();
        System.out.println("\nConnected to " + dma.getURL());
        System.out.println("Driver       " +
          dma.getDriverName());
        System.out.println("Version      " +
          dma.getDriverVersion());
        System.out.println("");
        // Create a Statement object so we can submit
        // SQL statements to the driver
        Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY ,ResultSet.CONCUR_READ_ONLY);
        // Submit a query, creating a ResultSet object
        ResultSet rs = stmt.executeQuery (query);
        // Display all columns and rows from the result set
        dispResultSet (rs);
        // Close the result set
        rs.close();
        // Close the statement
        stmt.close();
        // Close the connection
        con.close();
      }

    Thank you for your reply StuDerby!
    Actually the above script was before, as you suggested, leaving the ResultSetTeype default. This did not work...
    I am getting gray hair with SPSS - in terms of connectivity and "integratebility" none of their solutions offered is sufficient from my point of view.
    Variable definitions can only be read by the slow API, data can only be read by Python or Microsoft Products... and if you want to combine both you are in big trouble. I can only assume that this is a company strategy to sell their Dimensions Platform to companies versus having companies developping their applications according to business needs.
    Thanks again for any furthur suggestions and I hope, that some SPSS Developper will see this post!
    Cheers!!

  • 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

Maybe you are looking for

  • I can not upgrade my ipad 2 4.33 to ios 5.0.1 or 5.1

    I have ipad 2 and iphone 4 devices but from 2 days can not update my Ipad 2 to ios 5.1  the first error was 3194  after fix this error, it's show preparing ipad to update... and after several minutes error 1604.. And can't fix this. Why must to be so

  • Class not registered

    HD-4310 Webcam software. When installing I get this error message: " Class not registered " (without speech marks) I followed a tip to use " sfc /VERIFYONLY " to scan for a permissions problem but my system comes up clean. Can anyone help? Much appre

  • Pineapple logo while starting iPhone...

    when I power on my iPhone it shows a Pineapple icon, instead of an Apple... what's this...?

  • Sub-project rollup to Master project-How to achieve this??

    Dear Dina, In capital project: There is 1 master project, under master project there are 10 sub-projects ,how to rollup the sub-projects information into master project [client wants to see the all sub-project information at master project level only

  • Is there a way to "download" photos from a local folder?

    I have some photos in a local folder that I rescued from a dead laptop. When I download photos directly from my memory cards I always create subfolders by shot date, which is hugely useful for keeping them organized. Is there any way to use the Photo