Cursor type error.

when i execute my code i keep getting this error,
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state.
i have tryed using different cursor states and i still get this error. The error appears to come out only when i try to take the data out of the set.. Can someone please help me. thanks.
code........
java.sql.Statement statement = connection.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_READ_ONLY);
sqlQ = "SELECT sDate AS Expr1, PID AS Expr2, FileName, Surgeon FROM DMBASE_FileCollection WHERE (Surgeon = '" + sDoc + "')GROUP BY sDate, PID, FileName, Surgeon HAVING (PID = '" + sPIDRequest + "') AND (sDate = '" + sDate + "')";
System.out.println(sqlQ);
//set the result set
ResultSet rs = statement.executeQuery(sqlQ);
System.out.println("here");
//error here
String me = rs.getString(a);

that's what i'm doing here and i get this error
System.out.println("here");
rs.first();
rs.next();
String me = rs.getString(1);
err----------------
SELECT sDate AS Expr1, PID AS Expr2, FileName, Surgeon FROM DMBASE_FileCollection WHERE (Surgeon = 'DR SPINNARONI')GROUP BY sDate, PID, FileName, Surgeon HAVING (PID = '666') AND (sDate = '10-29-2001')
1008
here
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6109)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6266)
at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3310)
at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:5494)
at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:342)
at test2.DM_IncomingXMLID_S2(test2.java:219)
at Echo3.startElement(Echo3.java:90)
at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:965)
at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1858)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1234)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:347)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:283)
at Echo3.startParser(Echo3.java:38)
at test.jButton1ActionPerformed(test.java:52)
at test.access$100(test.java:14)
at test$2.actionPerformed(test.java:40)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1770)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1823)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:422)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:260)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:261)
at java.awt.Component.processMouseEvent(Component.java:5020)
at java.awt.Component.processEvent(Component.java:4819)
at java.awt.Container.processEvent(Container.java:1383)
at java.awt.Component.dispatchEventImpl(Component.java:3527)
at java.awt.Container.dispatchEventImpl(Container.java:1440)
at java.awt.Component.dispatchEvent(Component.java:3368)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3219)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2930)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2866)
at java.awt.Container.dispatchEventImpl(Container.java:1426)
at java.awt.Window.dispatchEventImpl(Window.java:1568)
at java.awt.Component.dispatchEvent(Component.java:3368)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:193)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:141)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:133)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:101)

Similar Messages

  • Invalid Cursor Position Error

    Help!
    I am using JRun3.1 and developing a web interface to a database. In this particular screen, I am using CachedRowSet (I downloaded this and added it to jrun classpath). I am getting "Invalid cursor position" error.
    I feel there is a problem with the usebean tag.
    This is my code:
    what is wrong with this?
    <%@ page language = "java" import="java.sql.*, java.util.*, javax.sql.*, sun.jdbc.rowset.*" %>
    <%
    String indSub = request.getParameter("indSub");
    String areaname = request.getParameter("selarea");
    %>
    <jsp:useBean id="crs" class="CachedRowSet" scope="session" >
    <%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    crs.setUrl("jdbc:odbc:asphData");
    crs.setCommand("SELECT siccode, sicdesc from siccode where sictitle = '" + indSub + "'");
    crs.execute();
    %>
    </jsp:useBean>
    <%@ include file="header2.htm" %>
    <link rel="stylesheet" href="http://localhost:8100/empData/almis.css" type="text/css">
    <br>
    <br>
    <table align="center">
    <tr><td class="moduleDesign" align="center">Employers Database</td></tr>
    </table>
    <br><br>
    <font size="+2" face="verdana sans-serif">
    <form action="employerDetail.jsp" method="post">
    <p><center><font color="Blue">Employers in the �<%= indSub %>� Industry
    <br>
    SIC Code:�<%= crs.getString("siccode") %>
    <br>State: Utah<br>
    Region: �<%=areaname %><br>
    </font></center></p>
    <p>
    <b>Description:</b>�<%= crs.getString("sicdesc") %>
    </p>
    </form>
    <jsp:include page="footer2.htm" />
    </body>
    </html>
    srajaman2

    Never mind!
    I have to issue a next() command to get to the first line of the resultset!
    srajaman2

  • WEAK REF CURSOR type

    This is the first time I have a need at work to use a REF CURSOR type of the weak variety. After reading documentation
    in SF's 'bible' Oracle PL/SQL Programming, I did everything right. Here's the code snippet:
    -- TYPES
    TYPE content_ID_curtype IS
    REF CURSOR;
    -- VARIABLES
    c_SEARCH_STRING CONSTANT VARCHAR2(12) := 'v_content_id';
    content_ID_cur content_ID_curtype;
    v_content_ID am_content_content.content_ID%TYPE;
    BEGIN
    cache_sql_rec.sql_stmt := REPLACE(cache_sql_rec.sql_stmt, c_SEARCH_STRING, template_name_rec.content_ID);
    OPEN content_ID_cur FOR cache_sql_rec.sql_stmt;
    LOOP
    FETCH content_ID_cur
    INTO v_content_ID;
    EXIT WHEN content_ID_cur%NOTFOUND;
    END LOOP;
    CLOSE content_ID_cur;
    END;
    Now the error I get is.... ORA-00911: invalid character When I used DBMS_OUTPUT to see the actual value of
    "cache_sql_rec.sql_stmt", the SQL query looks fine. Even when I hardcoded the sql statement after the FOR keyword, it
    worked fine. It's only when I use a variable to hold the whole SQL statement does it fail. Here's one value for the
    variable cache_sql_rec.sql_stmt:
    SELECT b.content_id
    FROM am_content_mofcollection a,
    am_content_collection b
    WHERE a.content_id = 149090
    AND a.collection_id = b.collection_id;
    Basically I replace the string with an actual content_ID. Now content_ID is of type NUMBER(12) as is the variable
    v_content_ID declared so that I FETCH INTO that variable, but the problem is, is that the exception gets raised during
    the OPEN...cursor...FOR....sql_statement command.
    Any thoughts on this bug?
    Thanks,
    Gio
    Giovanni Jaramillo
    Senior Software Engineer
    Oracle Database Group
    Amplified Holdings, Inc.
    5750 Wilshire Blvd., Ste 501
    Los Angeles, CA 90036-3638
    (323)-556-8792
    [email protected] http://www.amplified.com

    Yes it turns out that the data had a semicolon at the end since it's being inserted by someone else. I know when executing DDL or DML statements via NDS you omit the semicolon. But didn't know it applied to REF CURSORS.
    Also I added a colon to the variable that I was REPLACING since it can act as a bind variable.
    Thanks Andrew.
    Gio
    null

  • JDBC/SQLJ Team - Please respond - invalid column type error

    Hi, I have posted several messages regarding problems using SQL/J to call out a stored packaged function that returns a ref cursor, but haven't gotten one response. I have yet a new problem with it. JDBC team, please acknowledge!
    I change the way I obtain a connection to the database from using the Oracle.connect along with a properties file, to now using a DataSource connection pool. As a result, I am constantly getting a SQLException: Invalid column type error. If I change the call to the stored function to a query in the SQLJ code, it's fine. What's going on??
    A previous message I wrote stated I was constantly getting a "closed statement" error when I tried to call the next method of the iterator. I corrected this by removing the finally clause in the generated JDBC code that released the execution context.
    Again, the environment is JDK1.2.2, SQLJ 8.1.6 SDK, JDBC 8.1.6 thin, all on NT.
    Thanks
    David

    I am getting the same error message - Invalid Column Type. I am creating a Default Context by calling Oracle.getConnection(connection) passing in an instance of my own connection class that basically delegates to the OracleConnection. We wrapped the Connection so that we could trap and recover from lost database connections.
    My environment is Solaris 2.6, Oracle 7.3.4 with Sqlj 8.0.5.
    Thanks!
    [email protected]
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by David Christopher ([email protected]):
    Hi, I have posted several messages regarding problems using SQL/J to call out a stored packaged function that returns a ref cursor, but haven't gotten one response. I have yet a new problem with it. JDBC team, please acknowledge!
    I change the way I obtain a connection to the database from using the Oracle.connect along with a properties file, to now using a DataSource connection pool. As a result, I am constantly getting a SQLException: Invalid column type error. If I change the call to the stored function to a query in the SQLJ code, it's fine. What's going on??
    A previous message I wrote stated I was constantly getting a "closed statement" error when I tried to call the next method of the iterator. I corrected this by removing the finally clause in the generated JDBC code that released the execution context.
    Again, the environment is JDK1.2.2, SQLJ 8.1.6 SDK, JDBC 8.1.6 thin, all on NT.
    Thanks
    David<HR></BLOCKQUOTE>
    null

  • How do I fix the following error, it comes up every time I open a Firefox page; "type error: Components.classes[cid] is undefined" (JavaScript Application)

    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    how do I fix the following error, it comes up every time I open a Firefox page; "type error: Components.classes[cid] is undefined" (JavaScript Application)
    == This happened
    ==
    Every time Firefox opened
    == a few months ago
    ==
    == Troubleshooting information
    ==
    Application Basics
    Name Firefox
    Version 3.6.3
    Profile Directory
    Open Containing Folder
    Installed Plugins
    about:plugins
    Build Configuration
    about:buildconfig
    Extensions
    Name
    Version
    Enabled
    ID
    Adblock Plus 1.2 true
    Adobe DLM (powered by getPlus(R)) 1,6,2,49 true
    AVG Safe Search 9.0.0.825 true {3f963a5b-e555-4543-90e2-c3908898db71}
    AVG Security Toolbar 4.504.019.002 true avg@igeared
    Fasterfox 2.0.0 false
    Forecastfox 0.9.10.2 true {0538E3E3-7E9B-4d49-8831-A227C80A7AD3}
    Java Console 6.0.05 true
    Java Console 6.0.03 true
    Java Console 6.0.07 true
    Java Console 6.0.11 true
    Java Console 6.0.13 true
    Java Console 6.0.15 true
    Java Console 6.0.17 true
    Java Quick Starter 1.0 true [email protected]
    Microsoft .NET Framework Assistant 1.2.1 true {20a82645-c095-46ed-80e3-08825760534b}
    NoScript 1.9.9.77 true {73a6fe31-595d-460b-a920-fcc0f8843232}
    Java Console 6.0.19 true
    Java Console 6.0.20 true
    Modified Preferences
    Name
    Value
    accessibility.typeaheadfind.flashBar 0
    browser.history_expire_days 0
    browser.history_expire_days.mirror 180
    browser.places.importBookmarksHTML false
    browser.places.importDefaults false
    browser.places.leftPaneFolderId -1
    browser.places.migratePostDataAnnotations false
    browser.places.smartBookmarksVersion 2
    browser.places.updateRecentTagsUri false
    browser.startup.homepage_override.mstone rv:1.9.2.3
    extensions.lastAppVersion 3.6.3
    general.useragent.extra.microsoftdotnet ( .NET CLR 3.5.30729)
    keyword.URL http://au.yhs.search.yahoo.com/avg/search?fr=yhs-avg&type=yahoo_avg_hs2-tb-web_au&p=
    network.cookie.prefsMigrated true
    places.last_vacuum 1272511429
    print.print_bgcolor false
    print.print_bgimages false
    print.print_command
    print.print_downloadfonts true
    print.print_evenpages true
    print.print_in_color true
    print.print_margin_bottom 0.5
    print.print_margin_left 0.5
    print.print_margin_right 0.5
    print.print_margin_top 0.5
    print.print_oddpages true
    print.print_orientation 0
    print.print_pagedelay 500
    print.print_paper_data 0
    print.print_paper_height 11.00
    print.print_paper_size -134744073
    print.print_paper_size_type 1
    print.print_paper_size_unit 0
    print.print_paper_width 8.50
    print.print_printer Lexmark 4200 Series
    print.print_reversed false
    print.print_scaling 1.00
    print.print_shrink_to_fit true
    print.print_to_file false
    print.printer_Lexmark_4200_Series.print_bgcolor false
    print.printer_Lexmark_4200_Series.print_bgimages false
    print.printer_Lexmark_4200_Series.print_command
    print.printer_Lexmark_4200_Series.print_downloadfonts true
    print.printer_Lexmark_4200_Series.print_edge_bottom 0
    print.printer_Lexmark_4200_Series.print_edge_left 0
    print.printer_Lexmark_4200_Series.print_edge_right 0
    print.printer_Lexmark_4200_Series.print_edge_top 0
    print.printer_Lexmark_4200_Series.print_evenpages true
    print.printer_Lexmark_4200_Series.print_footercenter
    print.printer_Lexmark_4200_Series.print_footerleft &PT
    print.printer_Lexmark_4200_Series.print_footerright &D
    print.printer_Lexmark_4200_Series.print_headercenter
    print.printer_Lexmark_4200_Series.print_headerleft &T
    print.printer_Lexmark_4200_Series.print_headerright &U
    print.printer_Lexmark_4200_Series.print_in_color true
    print.printer_Lexmark_4200_Series.print_margin_bottom 0.5
    print.printer_Lexmark_4200_Series.print_margin_left 0.5
    print.printer_Lexmark_4200_Series.print_margin_right 0.5
    print.printer_Lexmark_4200_Series.print_margin_top 0.5
    print.printer_Lexmark_4200_Series.print_oddpages true
    print.printer_Lexmark_4200_Series.print_orientation 0
    print.printer_Lexmark_4200_Series.print_pagedelay 500
    print.printer_Lexmark_4200_Series.print_paper_data 1
    print.printer_Lexmark_4200_Series.print_paper_height 11.00
    print.printer_Lexmark_4200_Series.print_paper_size -134744073
    print.printer_Lexmark_4200_Series.print_paper_size_type 0
    print.printer_Lexmark_4200_Series.print_paper_size_unit 1
    print.printer_Lexmark_4200_Series.print_paper_width 8.50
    print.printer_Lexmark_4200_Series.print_reversed false
    print.printer_Lexmark_4200_Series.print_scaling 1.00
    print.printer_Lexmark_4200_Series.print_shrink_to_fit true
    print.printer_Lexmark_4200_Series.print_to_file false
    print.printer_Lexmark_4200_Series.print_unwriteable_margin_bottom 0
    print.printer_Lexmark_4200_Series.print_unwriteable_margin_left 0
    print.printer_Lexmark_4200_Series.print_unwriteable_margin_right 0
    print.printer_Lexmark_4200_Series.print_unwriteable_margin_top 0
    privacy.clearOnShutdown.cookies false
    privacy.clearOnShutdown.offlineApps true
    privacy.cpd.cookies false
    privacy.item.offlineApps true
    privacy.sanitize.migrateFx3Prefs true
    privacy.sanitize.timeSpan 3
    security.warn_viewing_mixed false
    security.warn_viewing_mixed.show_once false
    == Firefox version
    ==
    3.6.3
    == Operating system
    ==
    Windows XP
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)
    == Plugins installed
    ==
    *-getplusplusadobe16249
    *Office Plugin for Netscape Navigator
    *Adobe PDF Plug-In For Firefox and Netscape
    *Default Plug-in
    *NPRuntime Script Plug-in Library for Java(TM) Deploy
    *The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
    *Shockwave Flash 10.0 r45
    *iTunes Detector Plug-in
    *Garmin Communicator Plug-In 2.8.1.0
    *Windows Presentation Foundation (WPF) plug-in for Mozilla browsers
    *Java(TM) Platform SE binary
    *Next Generation Java Plug-in 1.6.0_20 for Mozilla browsers
    *Npdsplay dll
    *DRM Store Netscape Plugin
    *DRM Netscape Network Object

    How do I fix this problem ...javascript (cid) applications.

  • Downloading 4.0 onto XP it takes a long conection process, with boxes on unresponsive script and a java scipt app saying type error and is all very annoying so what can I do I want the old firefox back a

    I downloaded Firefox 4.0 replacing an earlier Firefox version. I have XP on my computer. When I now click on the Firefox icon after a time a window saying Unresponsive script and underneath script chrome etc comes up. I then press stop script and another window comes up Java Script application and type error. Eventually I get on to the internet but it's all very frustrating. I wish I had ignored the request to download 4.0
    Please help

    I can assure you that the sympton is indeed identical. For as the computer got worse, eventually it refused to start up and made 3 beeps. It has done this before, but today more times than before (just like when it first had this problem). Where-ever you go on the internet, it will tell you that the 3 beeps suggest the RAM is at fault. So, the same 3 beeps, means the same problem, which is the RAM.
    With that in mind, I re-ask my question with the same reasoning and justification; am I still covered under warranty? (Reasoning/Justification: Considering the original problem was not entirely fixed, though something else was to make the MacBook Pro last a little longer before the reoccurance of this problem).

  • "Schema validation found non-data type errors" error when passing a string value to date field in infopath

    Hi,
    I have an infopath web brower enabled form. In the form i have a date field.
    I am passing the data from the database to that field using the C# code.
    But, as the field from database is coming as string, i am getting an error, and i am not able to assign the value.
    I get the date value from database as "3/25/2011 12:00:00 AM"
    I used the below code:
    [CODE]
    if (objInfopathFormcData.myRecievedDate != null)
      myRoot.SelectSingleNode("/my:myFields/my:field97", NamespaceManager).SetValue(objInfopathFormcData.myRecievedDate);
    [/CODE]
    I am getting the error as "Schema validation found non-data type errors".
    How to set the value for a date field in Infopath.
    Thank you

    HI,
    I fixed it:
    Below code is used to fix:
    [CODE]
    XPathNavigator xfield = null;
    DateTime dtmyRecievedDate;
    dtmyRecievedDate = Convert.ToDateTime(objInfopathFormcData.myRecievedDate);
    if (objFormcData.FcCompletionDate != null)
    xfield = myRoot.SelectSingleNode("/my:myFields/my:field97", NamespaceManager);
    DeleteNil(xfield);
    xfield.SetValue(dtmyRecievedDate.GetDateTimeFormats().GetValue(5).ToString());
    // method to delete xsi:nil
    private void DeleteNil(XPathNavigator nav1)
    if (nav1.MoveToAttribute("nil", "http://www.w3.org/2001/XMLSchema-instance"))
       nav1.DeleteSelf();
    [/CODE]
    Thank you

  • Maximum open Cursors Excedded error - for every transaction

    Hi All,
    I am getting the maximum opn cursors exceeded error suddenly for every single db transaction i am trying to make in my application. this did not happen previously during my developemnt and testing phase.
    I have a question here that i tried to google but failed to get satisfactory answer.:-
    When we use a cursor in the stored procedure to fetch data, how to make oracle automatically close the cursors once the stored proc finishes executin. Or is there something i have to follow other with my current open cursors limit to ensure this problem does not happen?
    Thanks,
    Chaitanya

    Hi Justin,
    My oracle stored procs are called by java framework. In each place i was closing the connection object but there were a few places where i was not closing the resultset object which directly pointed to my oracle cursor.
    I have closed the objects in such places and tried again but still i am getting the same error. Mit it be an instance where the oracle db is not allowing me to connect to it at all. Something like restarting it would help? Restarting the server where the oracle software is hosted.
    Please excuse my blatant ignorance in this issue.
    Thanks,
    Chaitanya

  • Help - Editor does not contain a main type error (Eclipse)

    Hello,
    I'm trying to run a Text input program out of the Eclipse program and I keep getting this Editor does not contain a main type error - can someone help me
    here's the code
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.text.DecimalFormat;
    import java.util.Scanner;
    import uwcse.io.Input;
    public class FileInputExample {
         public static void main(String[] args) {
              // Create a Scanner to read the input file
              String fileName = new Input().readString("Input file name? ");
              System.out.println();
              Scanner scan;
              try {
                   scan = new Scanner(new File(fileName));
              } catch (FileNotFoundException e) {
                   System.out.println(fileName + " doesn't exist!");
                   return;
              // Read the file and count the number of occurences of A, B, ...
              int[] count = new int[26];
              while (scan.hasNextLine()) {
                   String line = scan.nextLine();
                   line = line.toLowerCase();
                   for (int i = 0; i < line.length(); i++) {
                        char c = line.charAt(i);
                        if (c >= 'a' && c <= 'z') {
                             count[c - 'a']++;
              scan.close();
              int length = 0;
              for (int i = 0; i < count.length; i++) {
                   length += count;
              // Display the statistics (as an histogram)
              DecimalFormat df = new DecimalFormat("0.00");
              for (int i = 0; i < count.length && length > 0; i++) {
                   double percent = count[i] * 100.0 / length;
                   String display = "" + (char) ('a' + i);
                   display += "(" + df.format(percent) + "%):\t";
                   for (int j = 1; j <= Math.round(percent); j++) {
                        display += "X";
                   System.out.println(display);
    }Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    First, note that your program uses a non-standard class, "uwcse.io.Input" which is not available to us. Normally that is a show stopper - in this case, it's not, as I was able to eliminate its use.
    Your program runs fine, so the error is an Eclipse error unrelated to Java.
    You need to ask for help at an Eclipse support site, not here, as these forums are Java language forums.

  • Invalid Cursor Position Error on Windows XP using CachedRowSet

    Hello, I don't know if this question lies here, but I thought it would be the well suited place so please pardon me if it isn't. I am trying to access multiple pages from my database on my XP machine but I am getting an "invalid cursor position" error when trying to access the next page. I don't know how this error is coming about because it works well on a Vista machine with no errors. I don't know if it is my drivers or something that brings about the problem. I am using mysql connecter 5.1.10, JRE 1.6.0_02 and windows XP SP2
    Below is a simple code that brings the error.
    package Admin; import javax.sql.rowset.CachedRowSet; import com.sun.rowset.CachedRowSetImpl; public class test { public void table() { try { CachedRowSet crs=new CachedRowSetImpl(); crs.setUrl("jdbc:mysql://host:3306/database");         crs.setUsername("User");         crs.setPassword("password"); crs.setCommand("select * from myTable"); int[] keys = {1}; crs.setKeyColumns(keys); crs.execute(); crs.last(); if(crs.getRow()>500){ //new overLimit(); } crs.setPageSize(3); crs.execute(); while (crs.next()) { System.out.print("page one----"); System.out.println(crs.getString(1)); } while(crs.nextPage()){ System.out.println("page two---"); while (crs.next()) { System.out.println("in page two"); System.out.println(crs.getString(1)); } } } catch (Exception e) { e.printStackTrace(); } } public static void main(String []args){ new test().table(); } }

    Yes I am running the same code on both machines. The output I get on the XP machine is shown below. I modified the code I posted earlier and replaced the "page two" text with "page (then page number)" and also omitted the "in page two" text for better readability---------PAGE 0---------
    DB09140110
    DU35463010
    EX29201810
    ---------PAGE 1---------
    EX38341510
    EX40471810
    KZ280299
    ----------PAGE 2---------
    LA130299
    LC130299
    MC081009
    ----------PAGE 3---------
    RZ300502
    VA130299
    VI020209
    ----------PAGE 4---------
    YX101008
    ZE220299
    ZF231105and vista....
    ----------PAGE 0---------
    EX38341510
    EX40471810
    KZ280299
    ----------PAGE 1---------
    LA130299
    LC130299
    MC081009
    ----------PAGE 2---------
    RZ300502
    VA130299
    VI020209
    ----------PAGE 3---------
    YX101008
    ZE220299
    ZF231105

  • Invalid cursor state error while executing the prepared statement

    hai friends,
    following code showing the invalid cursor state error while executing the second prepared statement.
    pls anyone help me
    String query = "select * from order_particulars where order_no=" + orderno + " order by sno";             psmt1 = conEntry.prepareStatement(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);             rs1 = psmt1.executeQuery();             rs1.last();             intRowCount = rs1.getRow();             particularsdata = new Object[intRowCount][6];             rs1.beforeFirst();             if (intRowCount >= 1) {                 for (int i = 0; rs1.next(); i++) {                     particularsdata[0] = i + 1;
    particularsdata[i][1] = rs1.getString(3);
    particularsdata[i][2] = Double.parseDouble(rs1.getString(4));
    rs1.close();
    psmt1.close();
    query = "SELECT sum(delqty) FROM billdetails,billparticulars WHERE order_no= " + orderno + " and " +
    "billdetails.bill_no = billparticulars.bill_no GROUP BY particulars ORDER BY sno";
    psmt1 = conEntry.prepareStatement(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
    rs1 = psmt1.executeQuery(); //error showing while executing this line

    Also .. Why using arrays instead of collections? Shifting the cursor all the way forth and back to get the count is fairly terrible.
    With regard to the problem: either there's a nasty bug in the JDBC driver used, or you actually aren't running the compiled class version of the posted code.

  • Muse JS Assert: Error calling selector function:Type error: Object has no method Muse Menu

    When exporting html and viewing locally we receive the following error... This error disappears after removing menu from top of page. This error does not occur when viewed on Outdoors360.businesscatalyst.com (our temporary site)
    Muse JS Assert: Error calling selector function:Type error: Object has no method Muse Menu
    Any ideas??

    I fix the problem.
    I have carefully reviewed JAVASCRIPT files and I could see that these are not a major influence within the site, only are reference code and utilities of the same application.
    By removing these files nothing has stopped working, I thought I would have some error in the sliders, or opacities, but no, nothing happened.
    DELETE IT
    FRANCISCO CATALDO DISEÑADOR GRÁFICO

  • RFC call from Delphi (Bad Variant Type error)

    Well, I'm trying to call an RFC function from Delphi via ActiveX objects..
    I have Codegear 2009 installed and it works without any problem..
    But on another system with Delphi7 installed when I ran same code it gives "Bad Variant Type" error when assigning SapLogonControl's connection object to SapFunction's connection parameter... Both computers have same SAP installation. And on both systems ActiveX objects imported correctly on Delphi.
    Here is the code:
    unit logon1;
    interface
    uses
    Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
    ExtCtrls, OleCtrls, StdCtrls, SAPFunctionsOCX_TLB,
    Grids, SAPLogonCtrl_TLB;
    type
      TForm1 = class(TForm)
      SAPFunctions1: TSAPFunctions;
      Button2: TButton;
      Grid: TStringGrid;
      Edit1: TEdit;
      Edit2: TEdit;
      Label1: TLabel;
      Label2: TLabel;
      SAPLogonControl1: TSAPLogonControl;
    procedure Button2Click(Sender: TObject);
    private
    { Private-Deklarationen }
    public
    { Public-Deklarationen }
    end;
    var
    Form1 : TForm1 ;
    Table, Funct, Connection : VARIANT ;
    implementation
    {$R *.DFM}
    procedure TForm1.Button2Click(Sender: TObject);
    begin
      Connection                  := SAPLogoncontrol1.newConnection;
      Connection.User             := 'testuser';
      Connection.System           := 'CRD';
      Connection.Client           := '300';
      Connection.ApplicationServer:= '10.1.1.10';
      Connection.SystemNumber     := '00';
      Connection.Password         := 'testpass';
      Connection.Language         := 'EN' ;
      if Connection.LogOn(0,true) = true then
      (* parameter "true" = SilentLogOn *)
      begin
        (* assign the existing connection to the *)
        (* component SAPFunctions1                *)
        SAPFunctions1.Connection := Connection; // It gives error on this line...
        Funct := SAPFunctions1.add('ZGIS_TEST_FUNC');
      end;
    end;
    end.
    As I said while Codegear 2009 runs this code without any problem, Delphi 7 crashes on that assignment.. Also I tried outside Delphi, and the file compiled with Codegear works on both systems while the file compiled with Delphi 7 again crashes on buth systems...
    Is there a problem with Delphi 7? Should I use at least Delphi 8 or something for compiling?

    Hi Hakan,
    You must use Non-Unicode RFC library for Delphi 7.0.
    ( Bende Delphi 7.0 kullaniyorum. Ayni hatayi aldim. Unicode library kullanmistim. Kaldirip Non-Unicode olani kullandim. Su an hata yok. RFC cagirabiliyorum. )
    Mustafa Yalcin

  • How do I get rid of the alert "(Java Scriprt Application)Type error: Text is undefined   I get it when I get a new Internet page using Firefow

    How do I get rid of the alert "(Java Scriprt Application)Type error: Text is undefined>  I get it when I get a new Internet page using Firefow

    I do not want to half to install things into my PC that i do not trust! I just want this gone and like i said Firefox should of given us the choice to add this and not forced us, because if there is no actual way to remove it then il be forced to remove Firefox till they either remove it or allow us to remove it!

  • When I click on firefox to open in my Mac, an error shows up: plug-in object Type error: id is undefined. When I click on the OK button, firefox opens. This never happened in FF 3. What is this?

    Also when I am in a site, such as an account, and click on a highlighted link, I get another error, {Javascript Application] can't create mcafee plug-in object: Type Error: components. classes [cid] is undefined. The only mcafee I had on my computer was the secure search and I uninstalled it, but I still get this message. When I click on the OK button with the error message, then the link opens up.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

Maybe you are looking for

  • Routing issue with 2 VPN on ASA

    Hello, I am trying to setup a VPN between 3 sites : site2 and site3 needs to communicate with site1(ASA) :      site1(ASA)      |               |      |               | site2          site3          Peer On site2 / site3 if have multiple peers that w

  • IOS 7 is taking too much time to download

    IOS 7 remains on estimating time remaining

  • Tracking in flash/Swf :: Help me please :)

    This is my first time working with Ad Tracking in Flash and I want to make sure I'm going about it correctly.. I can't test it on my side, so I want to know it's right when I pass it on to the client. I've gone through the tutorials on Adobe and here

  • Report only completion with Send E-mail button

    We would like to set up a new Captivate course with the purpose of familiarizing employees with a new system. Although we may include some questions for review and reinforcement, we only want to report that the learners have COMPLETED the course (by

  • How do I change my settings for my messaging on my computer

    How do I change my settings for my messaging on my computer