Invalid descriptor error ???

Hello -
i am getting a
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Invalid descriptor index
Can anyone help me with this error?
the foll. is my piece of code -
public boolean checkOldEntry(String n,String p) {
          String query;
          String pwd;
          ResultSet rs;
          query = "SELECT Password FROM Profile where" + "(Name = '"+n+"')";
          try{
               st = con.createStatement();
               rs = st.executeQuery(query);
               while ( rs.next()){
               pwd = rs.getString(2);
               if (pwd.equals(p))
                    return true;
          }catch(SQLException sqlex){
               System.out.println("checkOldEntry - sqlexception");
               sqlex.printStackTrace();
          } finally {
               try {
                    st.close();
               //     con.close();
               }catch(Exception ex){
                    System.out.println("checkOldEntry - general exception");
                    ex.printStackTrace();     
          }// end finall
          return false;
     }// end checkOldEntry

It does not matter if the table has two columns. This query
query = "SELECT Password FROM Profile where" + "(Name = '"+n+"')";
is only selecting one of them. You will only get one column in your result set. If you want two columns in your resultset, use this query
query = "SELECT Name, Password FROM Profile where" + "(Name = '"+n+"')";

Similar Messages

  • Invalid descriptor error when trying to access nss volums

    Hi everyone,
    sorry for my english, when some users try to access shared nss volumes they get this error " invalid descriptor", but other folders are accessible at the same level.
    users are on windows 7 and the last novell client.
    thanks

    On 23/06/2014 16:06, skaii wrote:
    > sorry for my english, when some users try to access shared nss volumes
    > they get this error " invalid descriptor", but other folders are
    > accessible at the same level.
    >
    > users are on windows 7 and the last novell client.
    Since you reference Novell Client I'm thinking that you're not using
    Novell's Dynamic File Services product[1] which is what this forum is
    for. If that is the case then you should repost in a more appropriate
    forum, depending on whether you're using Open Enterprise Server (OES) or
    NetWare.
    HTH.
    [1] http://www.novell.com/products/dynamic-file-services/
    Simon
    Novell Knowledge Partner
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below. Thanks.

  • Invalid descriptor index error

    hai...
    i am having this error..
    java.sql.SQLException:[Microsoft][ODBC Microsoft Access Driver]invalid descriptor index.
    I am doing RMI application..while i am trying to insert i got this error...
    here i paste my code....can anyone help me in finding out error.please...
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn=DriverManager.getConnection("jdbc:odbc:bnk11","","");
    Statement max = conn.createStatement();
    rs1 = max.executeQuery("Select max(AccountNo) from Customer");
    rs1.next();
    String maxValue = rs1.getString(1);
    int maxx = Integer.parseInt(maxValue);
    int max1 = maxx+2;
    max2 = Integer.toString(max1);
    Statement pin = conn.createStatement();
    rs2 = max.executeQuery("Select max(PinNo) from Customer");
    rs2.next();
    String maxValue1 = rs2.getString(2);
    int pinmaxx = Integer.parseInt(maxValue1);
    int pinmax1 = pinmaxx+3;
    String pinmax2 = Integer.toString(pinmax1);
    Statement sm=conn.createStatement();
    rs=sm.executeQuery("Select * from Customer");     
    sm.executeUpdate("insert into Customer values('"+max2+"','"+pinmax2+"','"+c+"','"+d+"','"+e+"','"+f+"','"+g+"','"+h+"','"+i+"')");
    conn.close();
    Thanks in advance...

    In future when you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read.
    The error is happening here
    rs2 = max.executeQuery("Select max(PinNo) from Customer");
    rs2.next();
    String maxValue1 = rs2.getString(2); // WRONG!You can't get the second column (2). There is only one column in that result set. It should be getXXX(1)
    And that's another thing. What in the holy hell are you doing here?
    String maxValue = rs1.getString(1);
    int maxx = Integer.parseInt(maxValue);
    int max1 = maxx+2;Sillyness.
    int max1 = rs1.getInt(1)+2;Finally you should look into using PreparedStatements. http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html

  • Database Connector Error: '07009:[Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index'

    <p>I&#39;m getting the following error:</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Database Connector Error: &#39;07009:[Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index&#39;</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal">&#160;</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="times new roman,times" size="2">when trying to run a report in Crystal 11 (inside of Crystal Report Designer 11)</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal">&#160;</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="times new roman,times" size="2">Please help!!!!!</font></p>

    duplicate - please do not post multiple times

  • Getting Invalid Descriptor Index (SQL ERROR) ERROR

    Hi,
    When i am running this java class then i am fetiching all the values from database table to the CSV file then i am getting the following database error.
    import java.io.FileWriter; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import com.fidelity.ftg.ereviewg2.migration.connection.DatabaseConnection; import com.fidelity.ftg.ereviewg2.migration.vo.object.DmUserVO; import com.fidelity.ftg.ereviewg2.migration.vo.table.Iereview.ITMigFilenetAttachErrorVO; /** * @Organization: Fidelity Investments/FTG * @Project: eReview_DataConversion * @File: DatabseFetching.java * @Description: * @date: Oct 28, 2008 * @author: 197881 **/ /** * @author 197881 * */ public class DatabseFetching { /** * @param args */ public static void main(String[] args) throws SQLException, Exception { // TODO Auto-generated method stub DatabaseConnection con = new DatabaseConnection(); Connection connection = con.getConnection(); String AttachId=null; StringBuffer buffer = new StringBuffer(); String tMigFilenetAttachErrorColumnName[] = { ITMigFilenetAttachErrorVO.PIECE_ID, ITMigFilenetAttachErrorVO.PIECE_NUM, ITMigFilenetAttachErrorVO.PIECE_VER, ITMigFilenetAttachErrorVO.PIECE_INSTANCE, ITMigFilenetAttachErrorVO.ATTACH_ID, ITMigFilenetAttachErrorVO.ERROR_CD, ITMigFilenetAttachErrorVO.ERROR_REASON }; FileWriter createCsvFileObj = new FileWriter("D:/TCS/1.csv"); String SQL = "select * from t_mig_filenet_attach_error"; Statement stmt = connection.createStatement(); ResultSet resultObj = stmt.executeQuery(SQL); while (resultObj.next()) { AttachId=resultObj.getString("attach_id"); if(AttachId.equals("attacha")) { System.out.println("attach id is"+AttachId); for (int i = 0; i < tMigFilenetAttachErrorColumnName.length; i++) { buffer.append(resultObj.getString(tMigFilenetAttachErrorColumnName));
    buffer.append(",");
    buffer.append("falure");
    buffer.append("\n");
    createCsvFileObj.write(buffer.toString());
    createCsvFileObj.close();
    *{color:#ff0000}********************ERROR*************************{color}* *{color:#ff0000}{color:#000000}# Connected to Database: sun.jdbc.odbc.JdbcOdbcConnection@a62fc3* *attach id isattacha* *{color}Exception in thread "main" java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index* * at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)* * at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)* * at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(Unknown Source)* * at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(Unknown Source)* * at sun.jdbc.odbc.JdbcOdbcResultSet.getString(Unknown Source)* * at sun.jdbc.odbc.JdbcOdbcResultSet.getString(Unknown Source)* * at DatabseFetching.main(DatabseFetching.java:58){color}*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    The columns from the ResultSet must be retrieved in the order in which they appear in the table. Say your table has columns Name, Address, City. Then you should retrieve them as:
    ResultSet.getString("Name");
    ResultSet.getString("Address");
    ResultSet.getString("City");
    Otherwise you will get an Invalid Descriptor Index.
    Like this:
    ResultSet.getString("Address");
    ResultSet.getString("Name");
    ResultSet.getString("City");
    Invalid Descriptor Index

  • Error #906, Invalid Descriptor

    Hi All,
    I have a LG KF 750 phone, on which I am trying to download a MIDlet. The contents of the JAD and the MANIFEST files are given below:-
    Hi All,
    I have a LG KF 750 phone, on which I am trying to download a MIDlet. The contents of the JAD and the MANIFEST files are given below:-
    ============= JAD FILE ==================
    MIDlet-Jar-Size: 268345
    MIDlet-Name: MyMIDlet
    homeScreen: home
    MIDlet-1: xyz,/appLogo.png,MyMIDlet
    MIDlet-Jar-URL: http://abc.com/a.jar
    profile: http://wap.sonyericsson.com/UAprof/W200iR301.xml
    MicroEdition-Configuration: CLDC-1.0
    userId: 2
    DeviceSoftwareClass: M20P2030ALL0
    Ant-Version: Apache Ant 1.6.5
    MIDlet-Icon: /appLogo.png
    user-agent: SonyEricssonW200i/R4GB Browser/NetFront/3.3 Profile/MIDP-2.0
    Platform-Version: 310
    MicroEdition-Profile: MIDP-2.0
    splashAtStartUp: splash.png
    StartUpScreenId: xyz_welcome
    catalogPrefix: xyz
    homescreencontenttype: home
    ObfuscationForWindows: false
    theme: xyz
    dsdcontentindex: 0
    ApplicationId: xyz
    StartUpContentId: xyz welcome
    MIDlet-Info-URL: http://xyz.co.in
    MIDlet-Vendor: xyz Pte Ltd
    MIDlet-Version: 1.0
    homescreencontentid: home ============================= MANIFEST FILE===================
    Manifest-Version: 1.0
    MIDlet-Name: MyMIDlet
    homeScreen: home
    MIDlet-1: MyMIDlet,/appLogo.png,MyMIDlet
    MIDlet-Jar-URL: http:/abc.com/.jar
    profile: http://wap.sonyericsson.com/UAprof/W200iR301.xml
    MicroEdition-Configuration: CLDC-1.0
    userId: 2
    DeviceSoftwareClass: M20P2030ALL0
    MIDlet-Icon: /appLogo.png
    Ant-Version: Apache Ant 1.6.5
    user-agent: SonyEricssonW200i/R4GB Browser/NetFront/3.3 Profile/MIDP-2
    .0
    Platform-Version: 310
    MicroEdition-Profile: MIDP-2.0
    splashAtStartUp: splash.png
    StartUpScreenId: xyz_welcome
    catalogPrefix: xyz
    homescreencontenttype: home
    ObfuscationForWindows: false
    theme: xyz
    dsdcontentindex: 0
    ApplicationId: xyz
    StartUpContentId: xyz welcome
    MIDlet-Info-URL: http://xyz.co.in
    MIDlet-Vendor: xyz Pte Ltd
    MIDlet-Version: 1.0
    homescreencontentid: homeHowever, the phone throws up "Invalid Descriptor (null) message when it tries to install the application.
    I have been unable to ascertain the cause of the problem up till now. Any help is appreciated
    Thanks in advance
    Edited by: AUTOMATON on Dec 29, 2008 5:48 PM

    From which application server you are trying to download the application???
    Also have you set the MIME-TYPE for the JAD and JAR in the web.xml

  • Sybase ASE 15.7.103 ODBC Driver invalid descriptor index

    Hey guys,
    after migration from oracle nuc to sybase ase 15.7.101 unicode and implementation of sapnote 1558958 (dbacockpit collection for NW 702) there were everything which was in dbacockpit displayed ok.
    After upgrade to patch 103 theres a problem in the dbacockpit. I will show in the register Database SID - Space - Tables and Indices - Tables.
    After I select this. There comes follwing error: ASE Error SQL30013:07009][SAP][ASE ODBC Driver]Invalid descriptor index.
    In error details I see SQLCode 30013
    The Database ist open and there are no other kown problems with connection. SAP could establish connection to sybase ase database and users can work normally.
    In the dbacockpit Database SID - Space - Devices and Databases are shown without problems.
    message details:
    Exception CX_DBA_ADBC in class CL_SYB_RDI_QUERY method GET_TABLES_SPACE line 217
    Kernel Error ID:
    WP ID: 4
    WP PID: 4272
    SYSID: SE1
    SY-SUBRC: 0
    SQL statement: SELECT TOP 50 DBNAME, USER_NAME AS TABOWNER, TAB_NAME AS TABNAME, ' ' AS PARTITIONNAME, 0 AS ID, 0 AS PARTITIONID, ' ' AS SNAPSHOT_TIMESTAMP, ' ' AS TIMESTAMP_FROM, ' ' AS TIMESTAMP_TO, SUM(TIME_PERIOD) AS TIME_PERIOD, AVG(ROW_COUNT) AS ROW_COUNT, MAX(ROW_COUNT) AS ROW_COUNT_MAX, AVG(TAB_RESERVED_LOB_KB) AS TAB_RESERVED_LOB_KB, MAX(TAB_RESERVED_LOB_KB) AS TAB_RESERVED_LOB_KB_MAX, AVG(TAB_USED_LOB_KB) AS TAB_USED_LOB_KB, MAX(TAB_USED_LOB_KB) AS TAB_USED_LOB_KB_MAX, AVG(TAB_DATA_LOB_KB) AS TAB_DATA_LOB_KB, MAX(TAB_DATA_LOB_KB) AS TAB_DATA_LOB_KB_MAX, AVG(TAB_DATA_UTL_KB) AS TAB_DATA_UTL_KB, MAX(TAB_DATA_UTL_KB) AS TAB_DATA_UTL_KB_MAX, AVG(TAB_DATAPGCLRATIO)*100 AS TAB_DATAPGCLRATIO, MIN(TAB_DATAPGCLRATIO)*100 AS TAB_DATAPGCLRATIO_MIN, AVG(TAB_LRGIOEFF)*100 AS TAB_LRGIOEFF, MIN(TAB_LRGIOEFF)*100 AS TAB_LRGIOEFF_MIN, AVG(DATACHANGE) AS DATACHANGE, MAX(DATACHANGE) AS DATACHANGE_MAX, AVG(forwrowcnt) AS forwrowcnt, MAX(forwrowcnt) AS forwrowcnt_MAX, AVG(delrowcnt) AS delrowcnt, MAX(delrowcnt) AS delrowcnt_MAX, AVG(extent0pgcnt) AS extent0pgcnt, MAX(extent0pgcnt) AS extent0pgcnt_MAX, AVG(oamapgcnt) AS oamapgcnt, MAX(oamapgcnt) AS oamapgcnt_MAX, AVG(oampagecnt) AS oampagecnt, MAX(oampagecnt) AS oampagecnt_MAX, MAX(str_replace(str_replace(str_replace(convert(VARCHAR(19),statmoddate,23),':',NULL),'-',NULL),'T',NULL)) AS statmoddate, AVG(datarowsize) AS datarowsize, MAX(datarowsize) AS datarowsize_MAX, AVG(TAB_DATA_TOTAL_KB) AS TAB_DATA_TOTAL_KB, MAX(TAB_DATA_TOTAL_KB) AS TAB_DATA_TOTAL_KB_MAX, AVG(TAB_DATA_UTL_TOTAL_KB) AS TAB_DATA_UTL_TOTAL_KB, MAX(TAB_DATA_UTL_TOTAL_KB) AS TAB_DATA_UTL_TOTAL_KB_MAX, AVG(TAB_USED_TOTAL_KB) AS TAB_USED_TOTAL_KB, MAX(TAB_USED_TOTAL_KB) AS TAB_USED_TOTAL_KB_MAX, AVG(TAB_RESERVED_TOTAL_KB) AS TAB_RESERVED_TOTAL_KB, MAX(TAB_RESERVED_TOTAL_KB) AS TAB_RESERVED_TOTAL_KB_MAX, AVG(TAB_UNUSED_TOTAL_KB) AS TAB_UNUSED_TOTAL_KB, MAX(TAB_UNUSED_TOTAL_KB) AS TAB_UNUSED_TOTAL_KB_MAX FROM ( SELECT DBNAME, USER_NAME, TAB_NAME, SNAPSHOT_TIMESTAMP AS SNAPSHOT_TIMESTAMP, SUM(TIME_PERIOD) AS TIME_PERIOD, SUM(ROW_COUNT) AS ROW_COUNT, SUM(TAB_RESERVED_LOB_KB) AS TAB_RESERVED_LOB_KB, SUM(TAB_USED_LOB_KB) AS TAB_USED_LOB_KB, SUM(TAB_DATA_LOB_KB) AS TAB_DATA_LOB_KB, SUM(TAB_DATA_UTL_KB) AS TAB_DATA_UTL_KB, CASE WHEN SUM(ROW_COUNT) > 0 THEN SUM(ROW_COUNT*TAB_DATAPGCLRATIO) / SUM(ROW_COUNT) ELSE 1 END AS TAB_DATAPGCLRATIO, CASE WHEN SUM(ROW_COUNT) > 0 THEN SUM(ROW_COUNT*TAB_LRGIOEFF) / SUM(ROW_COUNT) ELSE 1 END AS TAB_LRGIOEFF, CASE WHEN SUM(ROW_COUNT+delrowcnt) > 0 THEN SUM((ROW_COUNT+delrowcnt)*DATACHANGE) / SUM(ROW_COUNT+delrowcnt) ELSE 0 END AS DATACHANGE, SUM(forwrowcnt) AS forwrowcnt, SUM(delrowcnt) AS delrowcnt, SUM(extent0pgcnt) AS extent0pgcnt, SUM(oamapgcnt) AS oamapgcnt, SUM(oampagecnt) AS oampagecnt, MAX(statmoddate) AS statmoddate, CASE WHEN SUM(ROW_COUNT) > 0 THEN SUM(ROW_COUNT*datarowsize) / SUM(ROW_COUNT) ELSE 0 END AS datarowsize, SUM(TAB_DATA_KB+TAB_DATA_LOB_KB) AS TAB_DATA_TOTAL_KB, SUM(TAB_DATA_UTL_KB+TAB_DATA_LOB_KB) AS TAB_DATA_UTL_TOTAL_KB, SUM(TAB_USED_KB+TAB_USED_LOB_KB) AS TAB_USED_TOTAL_KB, SUM(TAB_RESERVED_KB+TAB_RESERVED_LOB_KB) AS TAB_RESERVED_TOTAL_KB, SUM((TAB_RESERVED_KB+TAB_RESERVED_LOB_KB) - (TAB_USED_KB+TAB_USED_LOB_KB)) AS TAB_UNUSED_TOTAL_KB FROM saptools..DBH_STG_TABLES WHERE SNAPSHOT_TIMESTAMP >= dateadd(ss,TIME_PERIOD,?) AND SNAPSHOT_TIMESTAMP <= dateadd(ss,5,?) AND BDOP = 1 AND BDOI = 0 GROUP BY DBNAME, USER_NAME, TAB_NAME, SNAPSHOT_TIMESTAMP ) AS STD_AGGR GROUP BY DBNAME, USER_NAME, TAB_NAME ORDER BY TAB_RESERVED_TOTAL_KB DESC AT ISOLATION READ UNCOMMITTED
    Database: +++SYBADM
    caused by
    Exception CX_SQL_EXCEPTION in class CL_SQL_RESULT_SET
    Kernel Error ID:
    DB Error: Yes
    SQL Code: 30013
    SQL Message: [ASE Error SQL30013:07009][SAP][ASE ODBC Driver]Invalid descriptor index
    DB Object Exists: No
    Duplicated Key: No
    Internal Error: 1
    Invalid Cursor: No
    Unknown Connection: No
    Connection Closed: No

    Thanks Mr Model-Bosch,
    we have installed the latest dbsl Patch 213. And we have installed the Patch Collection twice as described in SAP Note 1558958.
    So I have to wait. I hope my SAP Message will be edited soon.

  • Invalid Descriptor Index problem

    I'm accessing a SQL Server 7 DB and when i attempt to display an integer with 'rs.getString("newsId")' I get an - 'Invalid Descriptor Index' error on the page. I also tried getInt and getLong, but nothing seems to work. The code works with no errors when i connect to a MS Access DB. Any ideas?

    I just found my answer. I noticed a post where the person switched the variables to the order in which they were in the DB and it worked.
    Thanks anyway.

  • Strange - Invalid Descriptor Index

    Hello everyone,
    When I run the following code I get an Invalid Descriptor Index.
    //////////////////CODE////////////
    Object answer = JOptionPane.showInputDialog(this, "Enter Employee Name", "Search Records", JOptionPane.OK_CANCEL_OPTION);
    String query = ("SELECT * FROM tblEmployee WHERE employeeName = " + "'" + answer.toString() + "'");
    results = stmt.executeQuery(query);
    tfModField1.setText(results.getString(0));
    tfModField2.setText(results.getString(1));
    tfModField3.setText(results.getString(2));
    tfModField4.setText(results.getString(3));
    tfModField5.setText(results.getString(4));
    I know this error is usually caused by trying to use the columns in a different order than they were called by the query, but how does this apply when you want to select all of the columns? If anyone can help with this I would greatly appreciate it.
    Regards,
    Michael Finley

    I have also tried the following, which generates an Invalid Cursor State error
    //////////CODE/////////
              Object answer = JOptionPane.showInputDialog(this, "Enter Employee Name", "Search Records", JOptionPane.OK_CANCEL_OPTION);     
              String query = ("SELECT employeeName, employeePW, employeeSecurity, employeeTickets, employeeStatus FROM tblEmployee WHERE employeeName = " + "'" + answer.toString() + "'");
              JOptionPane.showMessageDialog(this, query);
              results = stmt.executeQuery(query);     
    tfModField1.setText(results.getString("employeeName"));
              tfModField2.setText(results.getString("employeePW"));
              tfModField3.setText(results.getString("employeeSecurity"));
              tfModField4.setText(results.getString("employeeTickets"));
              tfModField5.setText(results.getString("employeeStatus"));
    Again, I'm stumped.
    Regards,
    Mike Finley

  • Invalid Descriptor Index

    I am using MS Sql Server 2000. I am getting following error while trying to retrieve records.
    javax.servlet.ServletException: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
         org.apache.jsp.modiimptrans_jsp._jspService(modiimptrans_jsp.java:126)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    root cause
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index
         sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
         sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
         sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3908)
         sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:5699)
         sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:353)
         sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:410)
         org.apache.jsp.modiimptrans_jsp._jspService(modiimptrans_jsp.java:77)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)

    Gave up to use odbc jdbc bridge driver for MS SQLServer. Then try:
    http://jtds.sourceforge.net/
    or
    http://www.microsoft.com/downloads/details.aspx?FamilyID=4F8F2F01-1ED7-4C4D-8F7B-3D47969E66AE&displaylang=en
    Then your issue should disappear.

  • Invalid Descriptor Index After First Record

                   recordCount = 1;
                   if(rs != null)
                        rs.last();
                        totalRows = rs.getRow();
                        rs.first();
                        System.out.println("Total Rows: "+totalRows);
                   if (rs != null) while ( rs.next() )
                        hasResults = true;
                        for(rowCount = 0; rowCount < totalRows; rowCount++)
                             for(columnCount = 0; columnCount < 9; columnCount++)
                                  SearchMenu.fieldArray[rowCount][columnCount].setText(rs.getString(recordCount));
                                  recordCount++;
                        }I am using the above code to read and display data in a 20 row 9 column array of text fields. The database has 9 columns. The first record in a query is displaying correctly, but then I get Invalid Descriptor Index (and no more records are displayed). Can anyone help? Thanks a bunch.

    I went ahead and tried resetting the recordCount to 1
    after each row like you suggested, but that produced
    the same error and problem. Then you have another problem. But I doubt this is happening.
    It is my understanding
    that the first object in the resultset's second row
    is one past the last object of the first row, so
    resetting this count doesn't make sense to me
    anyway.I don't know what you mean exactly but I am pretty sure this is wrong.
    Try this.
    recordCount = 1;
                   if(rs != null)
                        rs.last();
                        totalRows = rs.getRow();
                        rs.first();
                        System.out.println("Total Rows: "+totalRows);
                   if (rs != null) while ( rs.next() )
                        hasResults = true;
                                                         recordCount = 1;//new line here!
                        for(rowCount = 0; rowCount < totalRows; rowCount++)
                             for(columnCount = 0; columnCount < 9; columnCount++)
                                  SearchMenu.fieldArray[rowCount][columnCount].setText(rs.getString(recordCount));
                                  recordCount++;
                        }

  • Youtube Facebook Google etc, Invalid URL error

    For many years now I've been putting up with a CONSTANT lingering problem with my Mac OS. These (on a very regular basis) irritating, "Invalid URL" errors.
    The picture that you see below is an example of my problem.  This example of a Youtube video giving me an error is from a recent article on www.macrumors.com.
    Where the youtube video is supposed to be is just an Error.  And as I scrolled down the page, all of the subsequent youtube videos had this same error.
    So I went to youtube.  After typing in the web address, I get the same error except that it fills the entire screen.
    After about 20 minutes (of constant screen refreshes and data dumps within safari) the youtube videos finally loaded as if nothing was wrong (as you can see in the second photo).
    Sometimes this problems lasts for 10 seconds.  But normally it can take between 10 minutes to an hour to begin working again.
    The other two websites that give me this same trouble is Google.com and Facebook.com.  But Facebook being the most notorious.  Not just because my actual facebook page won't load, but because of all of the news sites that load facebook garbage and coding searching for facebook.  When the facebook ip address cannot be resolved, these annoying error pop-ups begin bombarding my screen.  One minute facebook will work, and I'm reading down the newfeed, then all of the sudden nothing new will load.  When I try to refresh the page, I get an error stating that it cannot load the page.  Then I just have to wait.
    As you can see from the picture below, Sometimes facebook just gives me an error that states, "Safari cannot open the page Facebook.com because Safari cannot establish a secure connection to the facebook server."
    This happens EVERY single day.  It's really just a crap-shoot whether or not I will be able to get onto Facebook.
    Youtube is a little less often (usually happening about 3 or 4 times per week).
    Google got so bad that I finally had to change my search provider to Bing, because Google almost never worked.
    Has anyone else experienced these problems on their MAC?
    I ask because I have 3 MAC computers.  2 Laptops and a MacPro tower. 
    And EVERY single one has this same problem.
    This wasn't such a big deal; ie something I learned to live with... Up until I bought my wife (and Windows Vista convert) her new Macbook Air.  And within an hour of booting that thing up for the first time, her Facebook errored out.  And has done it pretty consistantly every day, at least twice, since then.
    If anyone else has this problem, how did you fix it????????

    Here are the results:
    I hope someone can make heads or tails out of this.
    And please keep in mind that in the past I have completely wiped and reinstalled after reformatting and within an hour or 2 I get the same errors on the these websites.
    Start time: 23:05:23 06/15/14
    Model Identifier: MacBookPro5,5
    System Version: OS X 10.9.3 (13D65)
    Kernel Version: Darwin 13.2.0
    Boot Mode: Normal
    Time since boot: 49 minutes
    FileVault: FileVault master keychain appears to be installed
    Diagnostic reports
       2014-05-19 UserEventAgent crash
       2014-05-23 qmasterqd crash
       2014-05-26 qmasterqd crash
       2014-06-02 DivX Player crash
       2014-06-02 PluginProcess crash
       2014-06-02 com.apple.WebKit.WebContent crash
       2014-06-02 com.apple.WebKit.WebContent crash
       2014-06-02 com.apple.WebKit.WebContent crash
    Log
       Jun 13 01:43:18 AFP_VFS afpfs_dead:  called on vfsid 4
       Jun 13 01:43:18 ASP_TCP CancelPendingReqsWithID : Adding the invalid vfsid 4 and counter is 0 to the list
       Jun 13 01:43:18 ASP_TCP CancelOneRequest: cancelling slot 15 error 89 reqID 2801 flags 0x29 afpCmd 0x45 so 0xffffff801586fca0
       Jun 13 01:43:18 ASP_TCP CancelOneRequest: cancelling slot 16 error 89 reqID 2802 flags 0x29 afpCmd 0x22 so 0xffffff801586fca0
       Jun 13 01:43:18 ASP_TCP CancelOneRequest: cancelling slot 17 error 89 reqID 2803 flags 0x29 afpCmd 0x22 so 0xffffff801586fca0
       Jun 13 01:43:18 ASP_TCP CancelOneRequest: cancelling slot 18 error 89 reqID 2804 flags 0x29 afpCmd 0x22 so 0xffffff801586fca0
       Jun 13 22:40:53 AFP_VFS afpfs_DoReconnect:  Max reconnect time: 30 secs, Connect timeout: 15 secs for /Volumes/Storagedisk_6_1TB
       Jun 13 22:41:28 AFP_VFS afpfs_dead:  called on vfsid 3
       Jun 13 22:41:28 ASP_TCP CancelPendingReqsWithID : Adding the invalid vfsid 3 and counter is 0 to the list
       Jun 13 22:41:28 ASP_TCP CancelOneRequest: cancelling slot 20 error 89 reqID 10889 flags 0x29 afpCmd 0x22 so 0xffffff802230a058
       Jun 13 22:41:28 ASP_TCP CancelOneRequest: cancelling slot 21 error 89 reqID 10890 flags 0x29 afpCmd 0x22 so 0xffffff802230a058
       Jun 13 23:26:04 process Preview[95635] caught causing excessive wakeups. Observed wakeups rate (per sec): 744; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 45020
       Jun 14 00:16:15 process Preview[2207] caught causing excessive wakeups. Observed wakeups rate (per sec): 2593; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 45020
       Jun 14 00:17:23 process Preview[2339] caught causing excessive wakeups. Observed wakeups rate (per sec): 1991; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 45210
       Jun 14 02:45:19 process QuickLookUIHelpe[4321] caught causing excessive wakeups. Observed wakeups rate (per sec): 189; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 45586
       Jun 15 00:44:53 msdosfs_fat_uninit_vol: error 6 from msdosfs_fat_cache_flush
       Jun 15 00:46:08 jnl: disk3s1: replay_journal: from: 283136 to: 1024512 (joffset 0x7a000)
       Jun 15 00:46:12 jnl: disk3s1: journal replay done.
       Jun 15 01:37:24 jnl: disk3s1: do_jnl_io: strategy err 0x6
       Jun 15 01:37:24 jnl: disk3s1: write_journal_header: error writing the journal header!
       Jun 15 01:37:24 jnl: disk3s1: close: journal 0xffffff8013ac5c20, is invalid.  aborting outstanding transactions
       Jun 15 01:37:26 jnl: disk3s1: replay_journal: from: 367616 to: 1361408 (joffset 0x3f000)
       Jun 15 01:37:27 jnl: disk3s1: journal replay done.
       Jun 15 10:33:57 process qmastercc[163] caught causing excessive wakeups. Observed wakeups rate (per sec): 1016; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 59722
       Jun 15 22:20:37 process smcFanControl[246] caught causing excessive wakeups. Observed wakeups rate (per sec): 324; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 46105
    kexts
       com.squirrels.airparrot.framebuffer (3)
    Daemons
       org.macosforge.xquartz.privileged_startx
       com.oracle.java.Helper-Tool
       com.microsoft.office.licensing.helper
       com.google.keystone.daemon
       com.adobe.fpsaud
    Agents
       org.macosforge.xquartz.startx
       com.oracle.java.Java-Updater
       com.hp.help.tocgenerator
       com.google.keystone.system.agent
       com.divx.update.agent
       com.divx.dms.agent
       org.w0lf.cDock
       com.adobe.ARM.UUID
    launchd
       /System/Library/LaunchAgents/com.apple.AirPortBaseStationAgent.plist
                 (com.apple.AirPortBaseStationAgent)
       /Library/LaunchAgents/com.divx.dms.agent.plist
                 (com.divx.dms.agent)
       /Library/LaunchAgents/com.divx.update.agent.plist
                 (com.divx.update.agent)
       /Library/LaunchAgents/com.google.keystone.agent.plist
                 (com.google.keystone.system.agent)
       /Library/LaunchAgents/com.hp.help.tocgenerator.plist
                 (com.hp.help.tocgenerator)
       /Library/LaunchAgents/com.oracle.java.Java-Updater.plist
                 (com.oracle.java.Java-Updater)
       /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
                 (org.macosforge.xquartz.startx)
       /Library/LaunchDaemons/com.adobe.fpsaud.plist
                 (com.adobe.fpsaud)
       /Library/LaunchDaemons/com.apple.aelwriter.plist
                 (com.apple.aelwriter)
       /Library/LaunchDaemons/com.google.keystone.daemon.plist
                 (com.google.keystone.daemon)
       /Library/LaunchDaemons/com.microsoft.office.licensing.helper.plist
                 (com.microsoft.office.licensing.helper)
       /Library/LaunchDaemons/com.oracle.java.Helper-Tool.plist
                 (com.oracle.java.Helper-Tool)
       /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
                 (org.macosforge.xquartz.privileged_startx)
       Library/LaunchAgents/com.adobe.ARM.UUID.plist
                 (com.adobe.ARM.UUID)
       Library/LaunchAgents/com.apple.AddressBook.ScheduledSync.PHXCardDAVSource.UUID. plist
                 (com.apple.AddressBook.ScheduledSync.PHXCardDAVSource.UUID)
       Library/LaunchAgents/org.w0lf.cDock.plist
                 (org.w0lf.cDock)
    Bundles
       /System/Library/Extensions/APExtFramebuffer.kext
                 (com.squirrels.airparrot.framebuffer)
       /System/Library/Extensions/hpPlugInInit.kext
                 (com.hp.scanner.PlugInInit)
       /System/Library/Extensions/hpPlugInInit.kext/Contents/Resources
                 (com.hp.scanner.PlugInInit)
       /System/Library/Extensions/ssuddrv.kext
                 (com.devguru.driver.SamsungComposite)
       /Library/Audio/Plug-Ins/Components/Ambience.component
                 (com.smartelectronix.magnus.Ambience)
       /Library/Audio/Plug-Ins/Components/ARIA Player AU.component
                 (N/A)
       /Library/Audio/Plug-Ins/Components/SmartMusicSoftSynth.component
                 (com.makemusic.audiounit.smartmusicsoftsynth)
       /Library/Audio/Plug-Ins/VST/ARIA Player VST Multi.vst
                 (N/A)
       /Library/Audio/Plug-Ins/VST/ARIA Player VST.vst
                 (N/A)
       /Library/Internet Plug-Ins/DivX Web Player.plugin
                 (com.divx.DivXWebPlayer)
       /Library/Internet Plug-Ins/Flash Player.plugin
                 (N/A)
       /Library/Internet Plug-Ins/googletalkbrowserplugin.plugin
                 (com.google.googletalkbrowserplugin)
       /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
                 (com.oracle.java.JavaAppletPlugin)
       /Library/Internet Plug-Ins/o1dbrowserplugin.plugin
                 (com.google.o1dbrowserplugin)
       /Library/Internet Plug-Ins/OVSHelper.plugin
                 (com.divx.OVSHelper)
       /Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin
                 (com.microsoft.sharepoint.browserplugin)
       /Library/Internet Plug-Ins/SharePointWebKitPlugin.webplugin
                 (com.microsoft.sharepoint.webkitplugin)
       /Library/Internet Plug-Ins/Silverlight.plugin
                 (com.microsoft.SilverlightPlugin)
       /Library/Internet Plug-Ins/SurveillanceClient.plugin
                 (com.boxdeng.xvmsplugin)
       /Library/PreferencePanes/Flash Player.prefPane
                 (com.adobe.flashplayerpreferences)
       /Library/PreferencePanes/HP Scanjet.prefPane
                 (com.hp.scanjet.prefs)
       /Library/PreferencePanes/JavaControlPanel.prefPane
                 (com.oracle.java.JavaControlPanel)
       /Library/QuickTime/CanonMJPEGAVI.component
                 (jp.co.canon.MJPEGAVIExporter)
       /Library/QuickTime/CanonMJPEGAVIDec.component
                 (jp.co.canon.CanonMJPEGAVIDec)
       /Library/QuickTime/CanonText.component
                 (jp.co.canon.Text)
       /Library/Spotlight/Finale.mdimporter
                 (com.makemusic.MDImporter.Finale)
       Library/Address Book Plug-Ins/SkypeABDialer.bundle
                 (com.skype.skypeabdialer)
       Library/Address Book Plug-Ins/SkypeABSMS.bundle
                 (com.skype.skypeabsms)
       Library/Caches/com.apple.Safari/Extensions/AdBlock.safariextension
                 (com.betafish.adblockforsafari)
       Library/Caches/com.apple.Safari/Extensions/ExifExt.safariextension
                 (de.phriedrich.exifext)
       Library/Caches/com.apple.Safari/Extensions/My eBay Manager-2.safariextension
                 (com.ebay.safari.myebaymanager)
       Library/Caches/com.apple.Safari/Extensions/Social Fixer.safariextension
                 (com.socialfixer)
       Library/Caches/com.apple.Safari/Extensions/Turn Off the Lights.safariextension
                 (com.stefanvd.turnoffthelights)
       Library/Internet Plug-Ins/Google Earth Web Plug-in.plugin
                 (com.Google.GoogleEarthPlugin.plugin)
       Library/Internet Plug-Ins/WebEx64.plugin
                 (com.cisco_webex.plugin.gpc64)
       Library/ScriptingAdditions/EasySIMBL.osax
                 (com.github.norio-nomura.EasySIMBL.osax)
    dylibs
       /usr/lib/libdvdcss.2.dylib
    Contents of /etc/ssh_config
        Host *
          SendEnv LANG LC_*
       Host *
           XAuthLocation /opt/X11/bin/xauth
    Font issues: 41
    Listeners
       launchd: afpovertcp
       launchd: microsoft-ds
       launchd: ssh
       kdc: kerberos
       nfsd: 1023
       rpc.statd: exp1
       rpc.lockd: 1017
       rpcbind: sunrpc
       rpc.rquot: garcon
    Wi-Fi
       link auth: wpa-psk
    User login items
       iTunesHelper.app
       smcFanControl
       Auto Mute.app
       SurplusMeterAgent.app
       RightZoom.app
       SpeechSynthesisServer.app
    Hidden apps
       .magicJack/Softphone/magicJack.app
       .magicJack/Softphone/splash.app
    Restricted files: 2584
    Safari extensions
       ExifExt
       Turn Off the Lights
       My eBay Manager
       AdBlock
       Social Fixer
    Elapsed time (s): 387

  • "Invalid Binary" error on app. Apple's reason is "Missing 64-bit support" due to changes from Feb 1st 2015

    Hello
    Can anyone help me with an "Invalid Binary" error on my app.
    Apple's response is:
    Dear developer,
    We have discovered one or more issues with your recent submission for "DPS Notes". To process your submission, the following issues must be corrected:
    Missing 64-bit support - Beginning on February 1, 2015 new iOS apps submitted to the App Store must include 64-bit support and be built with the iOS 8 SDK. Beginning June 1, 2015 app updates will also need to follow the same requirements. To enable 64-bit in your project, we recommend using the default Xcode build setting of “Standard architectures” to build a single binary with both 32-bit and 64-bit code.
    Once these issues have been corrected, use Xcode or Application Loader to upload a new binary to iTunes Connect. Choose the new binary on the app’s Details page in My Apps on iTunes Connect, and click Submit for Review.
    Regards,
    The App Store team
    Can someone from the Adobe DPS team let me know how I can recreate the .ipa file so that it will meet Apple's requirements.
    They seem to have moved the goalposts since I created the original .ipa file in December. I thought I'd submitted it, just went back through iTunes Connect to check info as I hadn't heard anything from them, then hit this brick wall. Any help offered would be much appreciated.
    Thanks
    Rebecca

    Hi
    I've Updated App Builder, gone back to the DPS App Builder portal, regenerated new zip and ipa files and downloaded them.
    I clicked the Application Loader 3.0 link, downloaded the latest Appication Version, clicked on the "Deliver your App" button, and submitted the newly built App that was built using 32.4.2 version. (All the app icons were listed as "stored on server" so I presume they are all ok). The .zip file appeared to 'deliver' to Apple successfully. I've tried to resubmit it but get ta "Redundant Binary Upload. There already exists a binary upload with build version..." error message, so presume the orginal binary upload was successful. I have no idea how I can get this app from the "prepare for submission", to "in review". The last time I thought I'd submitted this app I got as far as the "waiting for review" status, and no further.
    At the moment I don't have a"+" button in the Build section - as mentioned on page 66 of Adobe's Step_by_step_guide_to_dps_se.pdf.
    So I can't add the new .zip file to the iTunes Connect > My Apps portal in the Build section of the Versions tab.
    I have put a support email into Apple, but don't expect a reply any day soon.
    The problem with starting all the way back through the App wizard is that I really want to use all the same App Name, Bundle ID, and details etc.
    Do you mean, going back to the Folio Producer Panel, and building a whole new App?
    This process certainly isn't for the faint-hearted!
    HELP!

  • Case When Statement and ORA:01722 Invalid number error

    Hi folks, I have posted this under another heading as well under E-business suite so apologies if some you have already seen it but I would really appreciate some help on this one. Any suggestions are most welcome.
    We are trying to put together a calculation that returns the number of days absent an individual has had in a given time period. We need to cater for those absences that started before the period and are closed during it, absence that start during the period and end after it, and those that open and close within it.
    The period is always a rolling 6 months from sysdate.
    This is the calc we have come up with so far which works for some people but we get the invalid number error if the absence includes a half day - so 0.5, 1.5,etc.
    This is probably over complicated but we are not techie at all so are learning as we go!
    We are using the HRMS - Administration - Oracle Human Resources (Core) business area in 10G and the Absence Attendance and Person folders.
    SUM(TO_NUMBER(NVL(( CASE WHEN Absence Attendance.Actual Start Date < TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') THEN ( CASE WHEN Absence Attendance."Actual End Date" > SYSDATE THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),SYSDATE) ) ELSE ( CASE WHEN ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) END ) END ) END ) IS NULL THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),SYSDATE) ) ELSE ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) END ) END ) END ) END ) END ) ELSE ( CASE WHEN ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) END ) END ) END ) IS NULL THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),SYSDATE) ) ELSE ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( Absence Attendance.Duration Days ) END ) END ) END ) END ) END ),( DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") )),'999999990D00'))

    Hi,
    It could be that this is because you are using SYSDATE which contains the time as a fraction rather than TRUNC(SYSDATE) which just contains the current time. It could be that your working_dates_between raises this error.
    However, your formula is far more complicated than it needs to be.
    Firstly, you want to look at the date window ADD_MONTHS(TRUNC(SYSDATE), -6) to TRUNC(SYSDATE). Then you want to look at the portion of the absence that falls in the date window. This is GREATEST(Absence Attendance.Actual Start Date, ADD_MONTHS(TRUNC(SYSDATE), -6)) to LEAST(NVL(Absence Attendance."Actual End Date",TRUNC(SYSDATE)), TRUNC(SYSDATE)). You may need to add 1 to the absence end date because this is the last day of their absence rather than the date they return. It depends how you calculate the days between the start and end
    date of the absence. You can create calculations for the start and end date of the absences within the 6 months time window. Create calculation AbsenceStart as
    GREATEST(Absence Attendance.Actual Start Date, ADD_MONTHS(TRUNC(SYSDATE), -6))
    and AbsenceEnd as
    LEAST(NVL(Absence Attendance."Actual End Date",TRUNC(SYSDATE)), TRUNC(SYSDATE))
    Then you need to only pick up absence that a part of the absence in your 6 month date window. You can use a condition in the workbook or a condition in a case statement to do this. You then need to calculate the difference between these dates and SUM all the values.
    SUM(CASE WHEN AbsenceEnd >= AbsenceStart THEN WORKING_DAYS_BETWEEN(AbsenceStart, AbsenceEnd) END)
    That's it. Not so complicated after all.
    Rod West

  • Case When Statement and ORA:1722 Invalid number error

    Sorry I posted this in the wrong forum - I have the answer now
    Cheers
    HELP!!!
    We are trying to put together a calculation that returns the number of days absent an individual has had in a given time period. We need to cater for those absences that started before the period and are closed during it, absence that start during the period and end after it, and those that open and close within it.
    The period is always a rolling 6 months from sysdate.
    This is the calc we have come up with so far which works for some people but we get the invalid number error if the absence includes a half day - so 0.5, 1.5,etc.
    This is probably over complicated but we are not Techie at all so are learning as we go! We are using the HRMS - Administration - Oracle Human Resources (Core) business area in 10G and the Absence Attendance and Person folders.
    SUM(TO_NUMBER(NVL(( CASE WHEN Absence Attendance.Actual Start Date < TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') THEN ( CASE WHEN Absence Attendance."Actual End Date" > SYSDATE THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),SYSDATE) ) ELSE ( CASE WHEN ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) END ) END ) END ) IS NULL THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),SYSDATE) ) ELSE ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) END ) END ) END ) END ) END ) ELSE ( CASE WHEN ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) END ) END ) END ) IS NULL THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),SYSDATE) ) ELSE ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( Absence Attendance.Duration Days ) END ) END ) END ) END ) END ),( DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") )),'999999990D00'))
    Edited by: CPearce on Sep 25, 2008 8:03 AM

    Hi,
    It could be that this is because you are using SYSDATE which contains the time as a fraction rather than TRUNC(SYSDATE) which just contains the current time. It could be that your working_dates_between raises this error.
    However, your formula is far more complicated than it needs to be.
    Firstly, you want to look at the date window ADD_MONTHS(TRUNC(SYSDATE), -6) to TRUNC(SYSDATE). Then you want to look at the portion of the absence that falls in the date window. This is GREATEST(Absence Attendance.Actual Start Date, ADD_MONTHS(TRUNC(SYSDATE), -6)) to LEAST(NVL(Absence Attendance."Actual End Date",TRUNC(SYSDATE)), TRUNC(SYSDATE)). You may need to add 1 to the absence end date because this is the last day of their absence rather than the date they return. It depends how you calculate the days between the start and end
    date of the absence. You can create calculations for the start and end date of the absences within the 6 months time window. Create calculation AbsenceStart as
    GREATEST(Absence Attendance.Actual Start Date, ADD_MONTHS(TRUNC(SYSDATE), -6))
    and AbsenceEnd as
    LEAST(NVL(Absence Attendance."Actual End Date",TRUNC(SYSDATE)), TRUNC(SYSDATE))
    Then you need to only pick up absence that a part of the absence in your 6 month date window. You can use a condition in the workbook or a condition in a case statement to do this. You then need to calculate the difference between these dates and SUM all the values.
    SUM(CASE WHEN AbsenceEnd >= AbsenceStart THEN WORKING_DAYS_BETWEEN(AbsenceStart, AbsenceEnd) END)
    That's it. Not so complicated after all.
    Rod West

Maybe you are looking for

  • DSO upload and no data in Active data table

    Hi Experts, I have a strange problem.I have loaded data to DSO from DS in BI7. It has the further uplaod to cube.I have activated the DSO and it went sucessfull and had Request ID generated. It has added and transfer records available like 150000 rec

  • Can't Connect to WebDAV Server

    Greetings fellow forum. I'm hoping that someone can help me out here. My problem is this, i recently set up my office computer (referred to as G5) as a webDAV server so that i can publish my iCal calendars. I have a wireless enable PBG4 which i'm try

  • DW-CS3 Version of Word Word-Art

    I mocked-up a web-page layour in Word XP that I now want to re-produce in DW-CS3. The Design includes left and right columns that contain a vertical stacking of individuals' names rendered using Word's Word-Art. Is there a similar capability to Word-

  • CA-JVA on  the upgrade 46C to ECC 6.0 (with HR module)

    Hi experts, We have now finished the upgarde but ne things make me feel not good: In SAP  Note 316815 - CA-JVA: Upgr. R/3 Enterprise / ECC- data transfer AFVC->AFVU I think the transfer of those tables has not been worked fine. And it seems that the

  • STANDBY_USING_GRID

    Hi,     We plan to create standby database , i saw this doc on net : Scenarios Using Oracle Enterprise Manager is there any other document for creating STANDBY using GRID ? 1. if i create standby using GRID , what about the parameters in primary and