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++;
                    }

Similar Messages

  • Invalid Descriptor Index - darn SQL2000

    I'd like to first off say that I would much rather be using MySQL than SQL2000 but I have no choice. My boss is a Microsoft freak. eeuuuwww!!!
    Ok, my question. I have a table with approx 150 fields and I get an Invalid Descriptor Index when I use "SELECT * FROM". I know that the reason is because I have to list every field in the order of return but there are so many and if they are null then they are not displayed (thanx dreamweaver).
    When I run the query off the SQL2000 manager, it works without a problem.
    Is there a way to get this to work without typing out all 150 fields?
    Thanx,
    Philip

    I'd like to first off say that I would much rather be
    using MySQL than SQL2000 but I have no choice. My
    boss is a Microsoft freak. eeuuuwww!!!
    And apparently you (or perhaps even your boss) does not understand the power of stored procedures, triggers, etc.
    >
    Ok, my question. I have a table with approx 150
    fields and I get an Invalid Descriptor Index when I
    use "SELECT * FROM". I know that the reason is
    because I have to list every field in the order of
    return but there are so many and if they are null then
    they are not displayed (thanx dreamweaver).
    When I run the query off the SQL2000 manager, it works
    without a problem.
    Is there a way to get this to work without typing
    out all 150 fields? Well you would never 'type' them out anyways. You would simply use Enterprise Manager to export the schema and then just use that when building the select.
    Of course I would guess something is seriously wrong when you need to access 150 fields in the first place. Not to mention if they are in a single table.

  • 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.

  • 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 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

  • 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.

  • Invalid Descriptor Index (SQL exception)

    Hi Defts,
    im developing an application using swings, im getting an Invalid Descriptor Index (SQL exception). I have given my code below kindly help me out.
    private void formWindowActivated(java.awt.event.WindowEvent evt) {                                    
    // TODO add your handling code here:
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbc");
    Connection con = DriverManager.getConnection("jdbc:odbc:tourismdatasource", "sa", "");
    String sel= "select * from tab_places where place_ID=?";
    PreparedStatement ps=con.prepareStatement(sel);
    ps.setString(1, jTextField4.getText().toString().trim());
    ResultSet rs=ps.executeQuery();
    if(rs.next())
    jTextField1.setText(rs.getString("place_name").toString());
    jTextField2.setText(rs.getString("state").toString());
    jTextField3.setText(rs.getString("category").toString());
    jTextArea1.setText(rs.getString("place_des").toString());
    catch(SQLException se){JOptionPane.showMessageDialog(null, se.getMessage());}
    catch(ClassNotFoundException ce){JOptionPane.showMessageDialog(null, ce.getMessage());}
    }

    It would help to know what statement is throwing the exception. The stack trace tells you that.
    As a guess the "select *" is returning the columns in a specific order. You are not calling getString() in that order though.
    Or one of the getString() values is wrong.
    And get rid of the ToString() calls on the getString() methods - they are already strings.

  • Get  INvalid descriptor index

    i used the following in my code. compiles ok but give a
    Invalid Descriptor Index
    when i try to run this. why? isn't the index automatic?
    if not how can i get this index?
    while(res.next()) {
    tour = res.getString(1) + " TO " + res.getString(2);
    pls advise

    I agree that the original SQL returned a single column.
    Try this:
    "SELECT
                COLUMN2NAME,
                COLUMN3NAME,
                COLUMN6NAME,
                MAX(RANK)
    FROM
                MON1
    WHERE
                FROMNODE = " + from +
    "           AND PICK = 0
    GROUP BY
                COLUMN2NAME,
                COLUMN3NAME,
                COLUMN6NAME"            You'll use res.getString(1) to get COLUMN2NAME
    You'll use res.getString(2) to get COLUMN3NAME
    Since you are using a Access database, try getting the SQL statement to work in Access. Once the query works in Access, you can copy it over to Java.

  • 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

  • Add horizontal line after each record

    I have 10 records seperated by ID. I m using List in SSRS to show data on report. I need to add horizontal line after first record, then after second record till 10 th record. How do we add this line?
    Any help much appreciated.

    Hi SQL Insane,
    Per my understanding that you have add the tablix into the list and group on the "ID", now you want to add an horizontal line between each record which grouped by the ID like below, right?
    If so, please reference to the details information below:
    Select the entire rows and Right click to select the Insert row-Inside Group below to add an inside row group
    Select the new added inside row group and set properties as below to make sure there is only display the black solid line on the bottom just like to add an horizontal line:
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • 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+"')";

  • After Effects warning: An invalid track index

    Hello, I am running CC 2014 on Windows 7.
    I have a project with a significant amount of basic animation (just 2D scale and position keyframing), and while working on adding sound effects, I keep getting this error when I try to RAM preview: "After Effects: BE: An invalid track index has been added to the sequence."
    If I hit ok, the preview plays, but with no audio.
    Any ideas what to do? I've tried clicking tracks on and off, and it does help, but very inconsistantly to where I can't pin point the source of the problem. There's one track that when turned on, I do NOT get the error, and when turned off, or deleted, I DO get the error. This just baffles me.
    Thanks for any help-- I'm on a tight deadline and really need to work through this ASAP.

    You have two, and perhaps three, problems going on:
    1) Don't use mp3 audio in AE.  Just don't.  It has NEVER worked properly, and problems rear their ugly heads only intermittently... like when you time-remap it.  Convert mp3's to lossless audio files like wav or aiff.
    2) Don't Time Remap audio and expect it to work properly when you render.  It's better to export out the time-remapped audio as a wav or aiff, reimport and use the new audio clip when rendering.  Or just export it and use it in a video editing application along with your animations from AE.
    3) FORTY-NINE layers of audio?  That's crazy in AE!  AE stinks at audio!  It's Hell On Earth to mix all those tracks in AE!
    I bet you can find a different application to put all those tracks together with the video.  I bet you can figure out an alternate workflow.  And you should.  The best way to use audio in AE is as a reference for timing your animations.  I use that strategy when I'm working on my stuff, and when I render, I don't render an audio track... not even when it's lip-sync audio!  I match up everything in a video editing application, and I have never, EVER had a problem.  Not once.  You can find a different application for that audio work -- now go find it.

  • Rebuilding indexes after importing...

    My coworker and I are discussing whether it is necessary, or advised, to rebuild indexes after an import of the schema.
    My thinking is that the index data is put into fresh blocks thereby creating a very flat index tree without any fragmentation.
    But my coworker suspects that perhaps the blocks are built exactly as they existed in the source database.
    I could understand, perhaps, if the refresh were done by using RMAN which copies block by block, but even then I'm not sure.
    Can you help us understand this please?
    Thanks.
    Ed

    Hi,
    Normally, the indexes are build and statistics upfated after the import automatically. You do not ned to generate the statistics after the import until unless you are running very old version of database.
    Regards
    [sfa-dev1:oracle:10.2.0] $ imp help=Y
    Import: Release 10.2.0.4.0 - Production on Fri Nov 13 11:49:56 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    You can let Import prompt you for parameters by entering the IMP
    command followed by your username/password:
    Example: IMP SCOTT/TIGER
    Or, you can control how Import runs by entering the IMP command followed
    by various arguments. To specify parameters, you use keywords:
    Format: IMP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
    Example: IMP SCOTT/TIGER IGNORE=Y TABLES=(EMP,DEPT) FULL=N
    or TABLES=(T1:P1,T1:P2), if T1 is partitioned table
    USERID must be the first parameter on the command line.
    Keyword Description (Default) Keyword Description (Default)
    USERID username/password FULL import entire file (N)
    BUFFER size of data buffer FROMUSER list of owner usernames
    FILE input files (EXPDAT.DMP) TOUSER list of usernames
    SHOW just list file contents (N) TABLES list of table names
    IGNORE ignore create errors (N) RECORDLENGTH length of IO record
    GRANTS import grants (Y) INCTYPE incremental import type
    INDEXES import indexes (Y) COMMIT commit array insert (N)
    ROWS import data rows (Y) PARFILE parameter filename
    LOG log file of screen output CONSTRAINTS import constraints (Y)
    DESTROY overwrite tablespace data file (N)
    INDEXFILE write table/index info to specified file
    SKIP_UNUSABLE_INDEXES skip maintenance of unusable indexes (N)
    FEEDBACK display progress every x rows(0)
    TOID_NOVALIDATE skip validation of specified type ids
    FILESIZE maximum size of each dump file
    STATISTICS             import precomputed statistics (always) On 10gR2
    Edited by: skvaish1 on Nov 13, 2009 11:50 AM

Maybe you are looking for