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

Similar Messages

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

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

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

  • 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

    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.

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

  • Invalid column index error in sql developer

    Hi,
    I was trying to create stored procedures, functions and packages in sql developer which is connected to Oracle 11g. My instructor is able to execute all of them without any errors in 10g. However, when I try to execute them, I get- "Invalid column index error". Any suggestions on how to rectify this error?

    Hi,
    That is probably an
    ORA-17003: Invalid column index
    Which is a JDBC error. Is Java/JDBC somehow involved?
    If not, could you please post one of the failing statements?
    Regards
    Peter

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

  • Invalid coulmn index

    Im getting invalid coulmn index...any suggestions?...thanx in advance
    public static int[] getListSummary(UserDataVO userData) throws Exception {
    Connection connection     = null;
    PreparedStatement pstmt     = null;
    ResultSet resultSet          = null;
    int[] listSummary = {0,0};
    int leadCount = 0;
    try {
    connection = DataBaseConnectionManager.getConnection();
    if (connection != null) {
    if (userData.isAgentType()) {
    String sqlStmt = "SELECT COUNT(PK_LISTID) as TheCount FROM OLS_LISTING t" +
    " WHERE t.fk_agentid1 = ? or t.fk_agentid2 = ? ";
    // logger.debug(sqlStmt);
    pstmt = connection.prepareStatement(sqlStmt);
    pstmt.setInt(1,userData.getAgentId());
    pstmt.setInt(2,userData.getAgentId());
    resultSet = pstmt.executeQuery();
    resultSet.next();
    listSummary[0] = resultSet.getInt(1);
    listSummary[0] = resultSet.getInt(2);
    resultSet.close();
    pstmt.close();

    i made a couple of changes...seem to be getting the same error
    public static int[] getListSummary(UserDataVO userData) throws Exception {
    Connection connection     = null;
    PreparedStatement pstmt     = null;
    ResultSet resultSet          = null;
    int[] listSummary = {0,0};
    int leadCount = 0;
    try {
    connection = DataBaseConnectionManager.getConnection();
    if (connection != null) {
    if (userData.isAgentType()) {
    String sqlStmt = "SELECT COUNT(PK_LISTID) as TheCount FROM OLS_LISTING t" +
    " WHERE t.fk_agentid1 = ?";
    // logger.debug(sqlStmt);
    pstmt = connection.prepareStatement(sqlStmt);
    pstmt.setInt(1,userData.getAgentId());
    resultSet = pstmt.executeQuery();
    if (resultSet.next()){
    listSummary[0] = resultSet.getInt(1);
    resultSet.close();
    pstmt.close();
    }

  • How to use : bind character in DB adapter Select Query SOA11g. Getting Error code :17003 .java.sql.SQLException: Invalid column index error

    Hi All,
    The Actual query to perform is below.
    SELECT name,number from emp  WHERE CASE WHEN :1='T' AND term_date IS Not NULL THEN 1 WHEN :1='A' AND term_date IS NULL THEN 1 WHEN :1='ALL' THEN 1 ELSE  1 END = 1;
    I have tried in DB adapter like below as a parameter for :1 as #vInputParam
    SELECT name,number from emp  WHERE CASE WHEN #vInputParam='T' AND term_date IS Not NULL THEN 1 WHEN #vInputParam='A' AND term_date IS NULL THEN 1 WHEN #vInputParam='ALL' THEN 1 ELSE  1 END = 1;
    Getting Error code :17003 .java.sql.SQLException: Invalid column index error.
    Please suggest me on using ':' bind character in DB adapter Select Query SOA11g.
    Can someone help me on this please?
    Thanks,
    Hari

    Hi,
    Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
    This is the option you will get when you are extending your vo. So make sure that both are same.
    You can refer the below link too
    VO extension leads to "Invalid column index" exception
    Thanks
    Bharat

Maybe you are looking for

  • Oracle AQ to JMS Queue which is on Oracle Application server

    Hi, I am using Oracle Streams AQ Oracle database 10g and i have a JMS Queue on oracle Application server. how i can Propagate message from Oracle AQ (AQ$_JMS_TEXT_MESSAGE)Queue to JMS Queue. ? Thanks, Satnani

  • ALE Configurations in File to IDOC Scenario

    Hi All, We are doing File to IDOC Scenario. ALE Configurations done: R/3 Side: 1. Created RFC dest, pointing to XI and tested the connection for remote login to XI. 2. Created port in R/3(using automatically generated port name) and assigned the RFC

  • ISO code 3 character - usage in SAP

    Hello experts, There is field "ISO code 3 character" which can be customised under t-code : OY01 [alternatively - SAP NetWeaver >> General Settings >> Set Countries >> Define Countries in mySAP Systems ('New Entries')] It possibly can be entered in t

  • Upgrade Weblogic Workshop8.1 to Weblogic Workshop 10.2

    Hi, I am upgrading my application developed using weblogic workshop 8.1 sp4 to weblogic 10.2 using BEA workspace studio. In the process of upgrading, I encounterd following error: "*Invalid Workshop 8.1 Application, only applications built with SP4,

  • 20" iMac g4 won't boot after installing airport extreme card

    http://docs.info.apple.com/article.html?artnum=26237 This document shows a card that looks different from my card. The antenna is in the center in the picture and my card has the antenna to the side. The card seem a little smaller than the slot but i