Oracle:JDBC Call returns no results, SQL*Plus returns 1 record, Please help

Any help would be greatly appreciated.
Running 9.2.0.5.0, and using latest 9.2 JDBC 1.4_g drivers in thin mode.
Execute the following query from SQL*Plus and it returns one row, from JDBC using a PreparedStatement, I get no results. Here's the query, table def, record, etc.:
Query:
SELECT
ID_WEB_FRM,ID_WEB_SIT,CDE_LVL_1_FUNC,
CDE_LVL_2_FUNC,NUM_WEB_FUNC_PG,NUM_WEB_PG_ID
FROM
WEB_FRM
WHERE
ID_WEB_FRM = ' '
OR
(ID_WEB_SIT = 'test' AND CDE_LVL_1_FUNC = ' '
AND CDE_LVL_2_FUNC = 'u2T' AND NUM_WEB_FUNC_PG = 1
AND NUM_WEB_PG_ID = 0)
Record returned from SQL*Plus:
ID_WEB_FRM ID_WEB_SIT CDE CDE NUM_WEB_FUNC_PG NUM_WEB_PG_ID
NfRRmc5XZu test u2T 1 0
Both in the data returned and the query, there are no blanks, but they are a single space instead (hard to see in message here).
Java code:
int count = 1;
findDBNameStatement.setString(count++," ");
findDBNameStatement.setString(count++,form.getSiteID());
findDBNameStatement.setString(count++," ");
findDBNameStatement.setString(count++, form.getFunctionID());
findDBNameStatement.setInt(count++,form.getPageNumber());
findDBNameStatement.setInt(count++,form.getSectionNumber());
ResultSet resultSet = findDBNameStatement.executeQuery();
ResultSetMetaData metaData = resultSet.getMetaData();
resultSet.next() returns false
DB table:
CREATE TABLE web_frm (
ID_WEB_FRM varchar2(10) NOT NULL,
ID_WEB_SIT varchar2(20) NOT NULL,
NAM_WEB_FRM varchar2(40),
TXT_EMAIL_SUBJ varchar2(50),
CDE_LVL_1_FUNC char(3),
CDE_LVL_2_FUNC char(3) NOT NULL,
NUM_WEB_FUNC_PG int NOT NULL,
NUM_WEB_PG_ID smallint NOT NULL,
DTE_WEB_FRM_EFF date NOT NULL,
DTE_WEB_FRM_TRM date,
CDE_VLDT_RUL char(3),
DTE_LAST_EXPRT date,
TXT_CNFRMN_MSG varchar2(4000),
IND_UPDT_ALWD char(1) NOT NULL,
TXT_RECAP_HDR varchar2(4000),
TXT_RECAP_FTR varchar2(4000),
CDE_WEB_OBJ char(3),
NUM_MAX_FRM_WIDTH number(4,0),
IND_RECAP_PG char(1) NOT NULL,
IND_CNFRM_PG char(1) NOT NULL,
IND_DSPL_CNFRM_NUM char(1) NOT NULL,
CNT_SUBM_MAX int,
TXT_CHCE_ADD_MSG varchar2(255),
TXT_CHCE_MOD_MSG varchar2(255),
TXT_WEB_HDR varchar2(4000),
TXT_WEB_FTR varchar2(4000),
TXT_WAIT_LIST_MSG varchar2(255),
FORMOBJECTHEIGHT int NOT NULL,
FORMOBJECTWIDTH int NOT NULL
ALTER TABLE web_frm ADD ( CONSTRAINT PK_web_frm PRIMARY KEY (ID_WEB_FRM));
ALTER TABLE web_frm ADD ( CONSTRAINT UK_web_frm UNIQUE (ID_WEB_SIT,CDE_LVL_1_FUNC,CDE_LVL_2_FUNC,NUM_WEB_FUNC_PG,NUM_WEB_PG_ID)) ;
Thanks,
Matt

That's not quite right. From the javadocs:
next
public boolean next()
throws SQLException
Moves the cursor down one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on.
If an input stream is open for the current row, a call to the method next will implicitly close it. A ResultSet object's warning chain is cleared when a new row is read.
Returns:
true if the new current row is valid; false if there are no more rows
Throws:
SQLException - if a database access error occurs

Similar Messages

  • JDBC Call returns no results, SQL*Plus returns 1 record, Please help!

    Any help would be greatly appreciated.
    Running 9.2.0.5.0, and using latest 9.2 JDBC 1.4_g drivers in thin mode.
    Execute the following query from SQL*Plus and it returns one row, from JDBC using a PreparedStatement, I get no results. Here's the query, table def, record, etc.:
    Query:
    SELECT
    ID_WEB_FRM,ID_WEB_SIT,CDE_LVL_1_FUNC,
    CDE_LVL_2_FUNC,NUM_WEB_FUNC_PG,NUM_WEB_PG_ID
    FROM
    WEB_FRM
    WHERE
    ID_WEB_FRM = ' '
    OR
    (ID_WEB_SIT = 'test' AND CDE_LVL_1_FUNC = ' '
    AND CDE_LVL_2_FUNC = 'u2T' AND NUM_WEB_FUNC_PG = 1
    AND NUM_WEB_PG_ID = 0)
    Record returned from SQL*Plus:
    ID_WEB_FRM ID_WEB_SIT CDE CDE NUM_WEB_FUNC_PG NUM_WEB_PG_ID
    NfRRmc5XZu test u2T 1 0
    Both in the data returned and the query, there are no blanks, but they are a single space instead (hard to see in message here).
    Java code:
    int count = 1;
    findDBNameStatement.setString(count++," ");
    findDBNameStatement.setString(count++,form.getSiteID());
    findDBNameStatement.setString(count++," ");
    findDBNameStatement.setString(count++, form.getFunctionID());
    findDBNameStatement.setInt(count++,form.getPageNumber());
    findDBNameStatement.setInt(count++,form.getSectionNumber());
    ResultSet resultSet = findDBNameStatement.executeQuery();
    ResultSetMetaData metaData = resultSet.getMetaData();
    resultSet.next() returns false
    DB table:
    CREATE TABLE web_frm (
    ID_WEB_FRM varchar2(10) NOT NULL,
    ID_WEB_SIT varchar2(20) NOT NULL,
    NAM_WEB_FRM varchar2(40),
    TXT_EMAIL_SUBJ varchar2(50),
    CDE_LVL_1_FUNC char(3),
    CDE_LVL_2_FUNC char(3) NOT NULL,
    NUM_WEB_FUNC_PG int NOT NULL,
    NUM_WEB_PG_ID smallint NOT NULL,
    DTE_WEB_FRM_EFF date NOT NULL,
    DTE_WEB_FRM_TRM date,
    CDE_VLDT_RUL char(3),
    DTE_LAST_EXPRT date,
    TXT_CNFRMN_MSG varchar2(4000),
    IND_UPDT_ALWD char(1) NOT NULL,
    TXT_RECAP_HDR varchar2(4000),
    TXT_RECAP_FTR varchar2(4000),
    CDE_WEB_OBJ char(3),
    NUM_MAX_FRM_WIDTH number(4,0),
    IND_RECAP_PG char(1) NOT NULL,
    IND_CNFRM_PG char(1) NOT NULL,
    IND_DSPL_CNFRM_NUM char(1) NOT NULL,
    CNT_SUBM_MAX int,
    TXT_CHCE_ADD_MSG varchar2(255),
    TXT_CHCE_MOD_MSG varchar2(255),
    TXT_WEB_HDR varchar2(4000),
    TXT_WEB_FTR varchar2(4000),
    TXT_WAIT_LIST_MSG varchar2(255),
    FORMOBJECTHEIGHT int NOT NULL,
    FORMOBJECTWIDTH int NOT NULL
    ALTER TABLE web_frm ADD ( CONSTRAINT PK_web_frm PRIMARY KEY (ID_WEB_FRM));
    ALTER TABLE web_frm ADD ( CONSTRAINT UK_web_frm UNIQUE (ID_WEB_SIT,CDE_LVL_1_FUNC,CDE_LVL_2_FUNC,NUM_WEB_FUNC_PG,NUM_WEB_PG_ID)) ;
    Thanks,
    Matt

    I have verified the parameters and such, and if I run as a Statement instead of a PreparedStatement, the query works fine. After some more troubleshooting, I narrowed the problem down, but not sure of the fix.
    If I eliminate teh extra parameters and simplify things to:
    SELECT ID_WEB_FRM FROM WEB_FRM WHERE ID_WEB_SIT = 'test' AND CDE_LVL_2_FUNC = 'u2T' AND NUM_WEB_FUNC_PG = 1 AND NUM_WEB_PG_ID = 0
    The code works. But if I add the additional WHERE clause of CDE_LVL_1_FUNC = ' ' (has single space), it returns no data (record in the DB has single space in this new column. Query that does not work:
    SELECT ID_WEB_FRM FROM WEB_FRM WHERE ID_WEB_SIT = 'test' AND CDE_LVL_1_FUNC = ' ' AND CDE_LVL_2_FUNC = 'u2T' AND NUM_WEB_FUNC_PG = 1 AND NUM_WEB_PG_ID = 0
    It appears the JDBC Driver is trimming the parameter when it is a space when set through a PreparedStatement.setString(2," ")

  • Oracle 10.1.0.4.2 SQL Plus dbms_output.put_line not working

    I am using Oracle 10.1.0.4.2 SQL Plus, and dbms_output.put_line is not working. It returns the dbms_output ONLY from outside the procedure. I have dbms_output INSIDE my procedure, and none of it gets returned. Please help!
    Here is what I enter:
    set serveroutput on size 1000000;
    DECLARE
         x number:=0;
    begin
    DBMS_OUTPUT.ENABLE;
    c2reports.c2proc(x,'TEST');
    DBMS_OUTPUT.PUT_LINE('testX');
    END;
    testX
    There should be more besides the 'testX' that gets returned. The first line in my procedure has output code to print testY. Thanks in advance!

    This is the forum for the Oracle's SQL Developer (Not for general SQL/PLSQL questions). You should ask question like this in the PL/SQL forum

  • Calling a function from sql*plus

    I can call my procedure from sql *plus
    by doing
    sql>call Proc_name(x,y);
    How do you call a function?
    null

    John,
    I think moifying the statement
    CREATE OR REPLACE PROCEDURE "OGUSER"."OGX1" (user_county in integer, user_permit in integer )
    TO
    CREATE OR REPLACE FUNCTION "OGUSER"."OGX1" (user_county in integer, user_permit in integer ) return NUMBER is
    AND before end you will have to add a return statement
    (Probably
    return 0;
    exception
    when others then
    return 1;
    end;
    This will change your procedure to a function but I am not sure you'll be able to see your dbms_output's, if you call the function using select ...
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by john saucer ([email protected]):
    I want to turn my procedure into a function.
    So I can call it with a select statement.
    I'm kind of having problems with the return statement at the top and bottom.
    I don't quite understand how to declare the type in the return. My procedure calculates 2 pl/sql tables....
    My procedure looks like.
    CREATE OR REPLACE PROCEDURE "OGUSER"."OGX1" (user_county in integer, user_permit in integer )
    as
    i integer :=0;
    j integer :=0;
    type dept_table_type is table of ogxtest%rowtype
    index by binary_integer;
    type dept2_table_type is table of ogxtest%rowtype
    index by binary_integer;
    my_dept_table dept_table_type;
    my_dept2_table dept2_table_type;
    v_cotemp number := user_county;
    v_permittemp number := user_permit;
    v_origcotemp number := user_county;
    v_origpermittemp number := user_permit;
    v_count number(2) :=1;
    v_count2 number(2) := 1;
    v_oldcount number(2) :=1;
    v_oldcount2 number(2) := 1;
    begin
    select count(*) into v_count from ogxtest where oco=v_cotemp and opermit=v_permittemp;
    select count(*) into v_oldcount from ogxtest where nco=v_cotemp and npermit=v_permittemp;
    while v_count >= 1 LOOP
    i := i+1;
    v_count2 := v_count2 +1;
    select *
    into my_dept_table(i)
    from ogxtest where oco=v_cotemp and opermit=v_permittemp;
    v_cotemp := my_dept_table(i).nco;
    v_permittemp := my_dept_table(i).npermit;
    select count(*) into v_count from ogxtest where oco=v_cotemp and opermit=v_permittemp;
    end loop;
    while v_oldcount >= 1 LOOP
    j := j+1;
    v_oldcount2 := v_oldcount2 +1;
    select *
    into my_dept2_table(j)
    from ogxtest where nco=v_origcotemp and npermit=v_origpermittemp;
    v_origcotemp := my_dept2_table(j).oco;
    v_origpermittemp := my_dept2_table(j).opermit;
    select count(*) into v_oldcount from ogxtest where nco=v_origcotemp and npermit=v_origpermittemp;
    end loop;
    for i in 1..v_count2-1
    loop
    dbms_output.put_line(' reassigned to - orig county ' | |my_dept_table(i).oco | | ' orig permit ' | |my_dept_table(i).opermit| | ' new county ' | |
    my_dept_table(i).nco | | ' new permit ' | |my_dept_table(i).npermit );
    end loop;
    for j in 1..v_oldcount2-1
    loop
    dbms_output.put_line(' reassigned from - orig county ' | |my_dept2_table(j).oco | | ' orig permit ' | |my_dept2_table(j).opermit| | ' new county ' | |
    my_dept2_table(j).nco | | ' new permit ' | |my_dept2_table(j).npermit );
    end loop;
    end;
    <HR></BLOCKQUOTE>
    null

  • How can I get the return code of SQL*Plus under Win2000Pro

    How can I get the return code of SQL*Plus under Win2000Pro ?

    In a DOS batch script? Try ECHO %ERRORLEVEL%
    -- CJ

  • I have an iPhone 6.  For the first two weeks my bluetooth worked fine but then started having issues.  Now, although it shows that it is connected to Bluetooth, I can't hear any of the calls.  The radio continues to play.  Please help!

    I have an iPhone 6.  For the first two weeks my bluetooth worked fine but then started having issues.  Now, although it shows that it is connected to Bluetooth, I can't hear any of the calls.  The radio continues to play.  Please help!

    Hello there, Srushevics.
    It sounds like you may be having issues with the connectivity of your iPhone with the Bluetooth in your vehicle. The following Knowledge Base article offers up some great steps for troubleshooting that Bluetooth connectivity with your iOS device:
    If you can’t use a Bluetooth accessory or car kit
    To resolve the issue, you'll need to first sign in to iCloud and review your devices:
    Sign in to iCloud on your iOS devices and Macs with OS X Yosemite (available this fall).
    On one of your devices, tap Settings > Bluetooth and look under My Devices. You'll see all devices that are connected to Bluetooth, but make sure that you see your Apple devices that are signed in to iCloud and are using iOS 8 or OS X Yosemite.
    Sign out of your iCloud account from any devices that you don't want to use. To sign out of iCloud on an iOS device, tap Settings > iCloud > Sign Out.
    Then, remove any inactive devices from iCloud:
    Sign in to iCloud.com.
    Select Find My iPhone.
    Select any devices that aren't active anymore.
    Wait for Find My iPhone to stop trying to find the inactive device.
    You should see the option to remove this device from your account. Select it to remove the device.
    After following the steps above, restart the device with the issue. Then try to use it with your Bluetooth accessory.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Microphone of my iphone is not working when i call anyone nobody can listen but me, its working with headphone but its also working with videocam recording, please help me to solve this probelm.

    microphone of my iphone is not working when i call anyone nobody can listen me its working with headphone. but it is working with videocam recording, please help me to solve this probelm.

    Try this:
    1. Reset the iPhone by pressing and holding the sleep/wake and home buttons and releasing them, when the Apple logo appears on the display. Now test again.
    2. If the issue persists: Restore the iPhone without any of your own content, using this description from Apple: http://support.apple.com/kb/HT4137
    3. If the issue persists, Your iPhone need repair.

  • "Hello, I bought an iphone from Japan but I can not make calls fom him, his number is 012417004140945. Please help me."

    Hello, I bought an iphone from Japan but I can not make calls fom him, his number is 012417004140945. Please help me."

    Get SIM from the carrier who sold the iPhone.
    Or Get it unlocked from them if they offer unlocking service.
    If it is from SoftBank, they don't.

  • Oracle.jdbc.driver.oracleResultSet Vs java.sql.ResultSet

    Hi all
    Could any one got any idea on this problem...
    My application program is forced to use both Java Result Set(java.sql.ResultSet) and Oracle ResultSet(jdbc.driver.oracleResultSet).
    This on javac get compiled and is working fine....
    But when i try to compile with vbjc(visibroker-java compiler)... it failes to compile...
    throwing ...
    .."The method oracle.jdbc2.Blob getBlob(int) declared in class oracle.jdbc.driver.OracleResultSet cannot override the method of the same signature declared in interface java.sql.ResultSet. They must have the same return
    type."

    Hi Prowzen,
    Ur reply was much userful, which gave me a direction to prob into... Thank You Very MUCH.
    I relpaced
    BLOB blob = ((OracleResultSet)rs).getBLOB(int);
    with
    oracle.sql.BLOB blob =(BLOB)rs.getObject(int);
    So eliminating usage of OracleResultSet, the conflicts got cleared...
    Keep writing...
    Regards
    Sreekumar P P.
    [email protected]

  • Passing return code of SQL*PLUS 'exit' to host

    Say, I am running a sql plus script from the MS windows command prompt, and I am EXITing this script with a return code, do you know how I can capture the return code in the host environment ?

    Greetings,
    If U use a Shell script to invoke the SQLPLUS then U could use '$?' to see the return code.
    For Example,
    sqlplus -s > <<EOF
    connect USER_PSWD_DB
    column num_rows new_value num_rows format 9999
    select x num_rows from table_name;
    EXIT num_rows
    EOF
    if [ $? == 2 ]; then
    echo "Process failed..."
    fi
    Regards,
    Badhri ...

  • Couldn't show sql data in jtable, please help

    Dear All,
    I'm trying to display the data from database in a jtable by following the jtable demo example in Java Tutorials Sample Code; but, I couldn't output the data to the jtable. The following code is what I've done so far. Can anybody please point out a direction for showing the data in jtable? Thanks a lot in advance.
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.ArrayList;
    public class Patient {
    static String szJdbcURL = "jdbc:oracle:thin:@129.78.110.188:1521:MyDB";                
    static String szUser = "...";                
    static String szPasswd = "...";                
    static String szModelName = "...";
    static Oracle oracle = new Oracle(szJdbcURL, szUser, szPasswd);
    public void findMedication() throws SQLException{
      Statement stmt1 = null;
      try {
             stmt1=oracle.getConnection().createStatement();             
              String res1=null;
              String res2=null;                
         String sqlQuery="Select * From PatientTable ";
            ResultSet rs= stmt1.executeQuery(sqlQuery);
       if (!rs.isBeforeFirst())
             {System.out.println("OOPS! data not found.");
              System.out.println(); }
       else {
        while (rs.next()) {
       ArrayList<Medication> medList = new ArrayList<Medication>();
       res1=rs.getString("patientName");
       res2=rs.getString("medication");
       Medication med=new Medication (res1, res2);
       medList.add(med);
       System.out.println();
       finally {stmt1.close();}
    import java.util.ArrayList;
    public class Medication {
        String ptName;
        String ptMedication;
    public Medication(String ptName, String ptMedication){
      this.ptName=ptName;
      this.ptMedication=ptMedication;
    public String getPtName() {
      return ptName;
    public void setPtName(String ptName) {
      this.ptName = ptName;
    public String getPtMedication() {
      return ptMedication;
    public void setPtMedication(String ptMedication) {
      this.ptMedication = ptMedication;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.AbstractTableModel;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.util.ArrayList;
    public class TableDemo extends JPanel {
      private boolean DEBUG = false;
    public TableDemo () {
      super(new GridLayout(1,0));
      ArrayList<Medication> medList = new ArrayList<Medication>();
      //how to add the data to the ArrayList here?
            JTable table = new JTable(new MyTableModel(medList));
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            table.setFillsViewportHeight(true);
            //Create the scroll pane and add the table to it.
            JScrollPane scrollPane = new JScrollPane(table);
            //Add the scroll pane to this panel.
            add(scrollPane);
      class MyTableModel extends AbstractTableModel {
         private String[] columnNames = new String []{"Patient Name", "Medication"};
         ArrayList<Medication> medList = null;
        public MyTableModel (ArrayList<Medication> medList){
         this.medList=medList;
           public int getColumnCount() {  
         return columnNames.length;
       public int getRowCount() {
        return medList.size();
       public String getColumnName(int columnIndex) {
            return columnNames[columnIndex];
    public Object getValueAt(int rowIndex, int columnIndex) {
      Medication object = medList.get(rowIndex);
            switch (columnIndex) {
            case 0:
                 return object.getPtName();
            case 1:
                 return object.getPtMedication();   
            default:
                 return "unknown";
    @SuppressWarnings("unchecked")
    public Class getColumnClass(int c) {
            return getValueAt(0, c).getClass();
         private static void createAndShowGUI() {
             JFrame frame = new JFrame("TableDemo");
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             //Create and set up the content pane.
             TableDemo newContentPane = new TableDemo();
             newContentPane.setOpaque(true); //content panes must be opaque
             frame.setContentPane(newContentPane);
             //Display the window.
             frame.pack();
             frame.setVisible(true);
         public static void main(String[] args) {
             javax.swing.SwingUtilities.invokeLater(new Runnable() {
                 public void run() {
                     createAndShowGUI();

    This line will create an ArrayList which will be used to store the output data of the sql query with the type is Medication class
    NO! Read what TPD ask again carefully -
    Please explain (as explicit as you can) what these two lines do.
    Did you notice that TWO in there?
    Did you notice that your reply said 'This line' when it should have said 'These TWO lines .'?
    You are creating a new ArrayList EVERY TIME thru the loop; you are NOT creating ONE ArrayList and adding things to it.
    The problem is how to show the ArrayList in the jtable defined in another class.
    And the answer is: use one of the THOUSANDS of examples on the internet.
    See the trail 'How to Use Tables' in The Java Tutorials
    http://docs.oracle.com/javase/tutorial/uiswing/components/table.html
    Read the trail - try the example. You learn by doing and using code that already works.

  • Java and MS SQL Server 2000 problem, please help

    please help me. I am using java and MS SQL Server 2000, and I'm trying to access and verify the login. I'm getting the following error message: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index
    Can any please help in this regard.
    String userNumber = (String)userNumField.getValue();
    char[] userPasswordArray = userPasswordField.getPassword();
    String userPassword = new String(userPasswordArray);
         try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Dikolobe_Data");
                java.sql.PreparedStatement statement = connection.prepareStatement(
                        "SELECT USER_NUMBER, USER_PASSWORD, USER_CLASS, USER_STATUS " +
                        "FROM SYS_USER " +
                        "WHERE (USER_NUMBER = ? AND USER_PASSWORD = ?);");
                statement.setString(1, userNumber);
                statement.setString(2, userPassword);
                java.sql.ResultSet result = statement.executeQuery();
                if(result.next()) {
                    String userStatus = result.getString(4);
                    if(userStatus.equals("logged on")) {
                        String loginErrorMessage = "User with number: " + userNumber + " is already logged on.";
                        javax.swing.JOptionPane loginErrorPane = getNarrowOptionPane(72);
                        loginErrorPane.setMessage(loginErrorMessage);
                        loginErrorPane.setMessageType(javax.swing.JOptionPane.ERROR_MESSAGE);
                        javax.swing.JDialog loginErrorDialog = loginErrorPane.createDialog(null, "Login Error");
                        loginErrorDialog.setVisible(true);
                    else {
                        String userClassification = result.getString(3);
                        if(userClassification.equals("Administrator")) {
                            AdminHomePage newAdminHomePage = new AdminHomePage();
                            newAdminHomePage.setVisible(true);
                        else if(userClassification.equals("Educator")) {
                            EduHomePage newEduHomePage = new EduHomePage();
                            newEduHomePage.setVisible(true);
                        statement = connection.prepareStatement(
                                "UPDATE SYS_USER SET USER_STATUS = ? " +
                                "WHERE USER_NUMBER = ?");
                        statement.setString(1, "logged on");
                        statement.setString(2, userNumber);
                        statement.executeUpdate();
                        dispose();
                }

    Doesn't the following link give you enough information?
    http://www.google.com/search?q=invalid+descriptor+index
    Anyway .. This error means that the given ResultSet column index which you're trying to retrieve the value from is out of the range.

  • Oracle 8.1.7 on HP UX 11.0.0 Please help..

    hi oracle gurus,
    I am using Oracle 8.1.7 on HP UX 11.0.0 and my application is on Solaris 2.6.
    I am getting exceptions as shown below. Atually the problem does NOT happen often , but we do get this issue
    once in a while. Could anyone give some explanation for the possible cause of this Exception. We are sure that nothing had gone wrong from our part.
    Please help..
    Many thanks,
    george
    java.sql.SQLException: Io exception:Invalid Packet Lenght
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java,
    Compiled Code)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java,
    Compiled Code)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java,
    Compiled Code)
    at
    oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.jav
    a, Compiled Code)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java ,
    Compiled Code)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.
    java , Compiled Code)
    at
    oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java,
    Compiled Code)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java,
    Compiled Code)
    at
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java,
    Compiled Code)
    at com.tdiinc.EventDBAdapter.a(EventDBAdapter.java, Compiled Code)
    at com.tdiinc.EventDBAdapter.storeEvent(EventDBAdapter.java,
    Compiled Code)

    Sorry - OTN has never had the HP version of 8i available for download from OTN. We just started posting HP versions with 9i: http://otn.oracle.com/tech/hp/content.html
    Regards,
    OTN
    All, trying to download a copy of Oracle 8.1.7 for HP-UX 11.0. This download seems no longer to be available (just 9i) and judging by the other posts on this topic, Oracle dont seem to care either - this is not exactly good customer service!
    ***ORACLE - where have the 8.1.7 downloads gone, and when can we expect them back? *****
    Seb Gevers
    Director, IT Services
    SVi (Galway)

  • What tool I need to download to execute SQL scripts inOracle? please Help!

    I'm a SQL Server developer trying to pratice SQL scriptinging in ORACLE environment. Can any subject matter expert let me know exactly which tool I need to download to experiment with SQL scripting? It's kind of confusing as ORACLE has so many components. If I'm correct, SQL Plus might be the tool and PL/SQL is the ORACLE version of SQL language/scripting. I know that i can download 180 days of evaluation version software. Can someone tell me the exact link of the oracle tool where I can execute my SQL scripts?
    Thank you so much in advanced.
    Thanks
    Syed Islam

    Try Oracle Express Edition (XE)
    Completely free.
    You can use SQL*Plus, but coming from Windows/SQL world, you'll definitely enjoy using SQL Developer as well. That's a separate download. You'll have a worksheet, visual query builder, object navigator/browser, etc - much like you see in SSMS.

  • Errors when applying sql expression on filter, please help

    Hello guys
    I was trying to put a filter on the date column and filter between timestampadd(sql_tsi_day,-31,current_date) and current_date
    I was successfully able to define both field on sql expression of the filter and I selected "is between"
    However when I run reports it returns the following errors:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22024] A comparison is being carried out between non-compatible types. (HY000)
    SQL Issued: SELECT "Year"."Transaction Date" saw_0 FROM tranSale_cube WHERE "Year"."Transaction Date" BETWEEN timestampadd(sql_tsi_day,-31,current_date) AND current_date ORDER BY saw_0
    When I using the same timestamp expression on the column formula and run report without filters, the report will return the correct date however though
    I am using essbase as the data source.
    Please help
    Thanks

    Thanks
    However, the error still exist the same.. This error code returns when I run report based on this one single column
    when I put this date column with measures and other columns then run report, I get a different error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 42043] An external aggregate is found in an outer query block. (HY000)
    SQL Issued: SELECT Product."Brand Name" saw_0, "Up Level"."Trial - level 12" saw_1, "Year"."Transaction Year" saw_2, "Year"."Transactoin Month" saw_3, "Year"."Transaction Date" saw_4, tranSale.count_of_transactions saw_5, Avg(tranSale.count_of_transactions by "Up Level"."Trial - level 12", "Year"."Transactoin Month", Product."Brand Name") saw_6 FROM tranSale_cube WHERE ("Up Level"."Trial - level 12" IN ('0', 'Product Upsell')) AND ("Year"."Transactoin Month" >= '2009 Feb') AND ("Year"."Transaction Date" BETWEEN timestampadd(sql_tsi_day,-31,current_date) AND current_date) ORDER BY saw_0, saw_1, saw_2, saw_3, saw_4
    I believe it must be something with the essbase that is not serving OBIEE well. Because I tried the same filter on a different environment not having essbase, it return me the right results..
    Could anyone help?
    Thanks

Maybe you are looking for