ODBC data source error, invalid cursor state??

I'm using Photoshop Album Starter Edition 3.0, on Windows XP, and I was having some trouble organizing so I deleted all the photos in the catalogue, but now I can't add any new images. After opening the program and trying to add new pictures, I get the error that the files can't be found. After that one time, every time I try to add any photos at all, it gives me this error:
The ODBC data source returned the following error:
"[Microsoft][ODBC Microsoft Access Driver]Invalid cursor state"
I've tried restarting the program, the computer... I don't know what the error even means or how to solve this problem. So if anyone has any ideas, please let me know. Oh, and I would reinstall the program, except I think it just came with the computer, I don't have a cd with it or anything. Is there somewhere else or another way to reinstall? Anyhow I'm done now, please help if you can. Thanks. :)

Since this is a free software, you can download this from Adobe.com. Try reinstalling Photoshop Album Starter Edition 3.0. If Reinstall does not work, try repairing the Windows ODBC drivers.
The reason for the error may be the Windows ODBC Drivers.To repair the ODBC drivers, follow these steps:
1) Go to Start>Settings>Control Panel. Select Add/Remove Programs and select SP2 and uninstall.
2) Insert your original Win XP CD and choose the Upgrade option.
3) When completed, reinstall SP2. Go to Start>Windows Updates and select SP2.
You can also try this:
Install Windows XP Service Pack 2 _or_ install the "Microsoft Data Access Components (MDAC) 2.8" from http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-b037-185d0506 396c&DisplayLang=en
Please let us know if that worked.
-Smriti

Similar Messages

  • ODBC Data Source Error

    I was having with Crystal communicating with one of my Access databases that had a list box. In Crystal it would take the list box, add and remove letters. It was suggested that I check with my IT department to see if there are any updates. Well they upgraded me from Crystal XI to Crystal XI R2. Things have gone downhill from there. First I couldnu2019t even open the program and they ended up reinstalling everything again. Now I can open Crystal, but all reports I previously created and new ones I try to create cannot make any connection through ODBC. My IT person and I have tried several things even installing a couple new drivers. My IT department does not provide technical support for software so now Iu2019m on my own to figure this out. If anyone can provide me with any assistance or any suggestions where to check I would greatly appreciate it.
    My problem is any time I try to make an ODBC connection to either create or update a report I go through the steps and get an error at the connection information page and cannot go any further. This error happens with MS Access or MS Excel.  The error is "Login Failed. Details: Cannot obtain error message from server. I have no logins or passwords.

    In the Organizer workspace, do a
    File > Catalog > Recover
    command. That command "cleans up" your Elements catalog and often resolves ODBC data source error messages.

  • Can no longer upload photos - ODBC data source error [was: Photoshop Album Starter Edition 3.2]

    Hi everyone! Thanks in advance for any help somone  can provide!
    I can no longer upload photos, which sucks. I get an error message thats says : The ODBC data source returned the following error: "[Microsoft][ODBC Microsoft Access Driver] The search key was not found in any record."
    I understand adobe is no longer issuing updates for this program, but is there anything I can do to salvage it? Oh I hope there is. Thanks again!

    [Moved from Photoshop forum to Photoshop Album Starter Edition forum]

  • HELP! INVALID CURSOR STATE

    i have this simple jsp page that will display a few data from an SQL Database... im just trying to check my connectivity. but everytime i view the page it says "[Microsoft][ODBC SQL Server Driver]Invalid
    cursor state'"my JSP environment is
    J2EE 1.2.1
    JDK 1.3.0_02
    BDK 1.1
    TOMCAT 3.2.1
    SQL Server 2000 Enterprise Edition
    Running on Windows 2000 server
    Heres my simple code:
    <%@ page language = "java" import = "java.sql.*" %>
    <html>
    <body>
    <%
    Connection con = null;
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:testdsn:, "sa", "");
    Statement stmt = con.createStatement();
    Resultset rs = stmt.executeQuery("select * from testtable");
    while(rs.next());
    out.println(rs.getString(1));
    out.println(rs.getString(2));
    catch(Exception e)
    out.println(e.toString());
    %>
    </body>
    </html>
    my testtable have 2 columns and 6 rows all in varchar datatype with values:
    test 1 | a
    test 2 | b
    test 3 | c
    test 4 | d
    test 5 | e
    test 6 | f
    is there something wrong with the code? with my environment? please help im finishing a site for a school project but i cant seem to make jsp and sql work

    See if using PreparedStatement works better for you than Statement. Sometimes it has better manners.
    - Saish
    "My karma ran over your dogma." - Anon

  • Invalid cursor state error

    Hello everyone i am building a database/web page application using Dreamweaver 8 that allows sudents to report computer issues. The submitting works fine it stores all information to the databse my problem now is updating the database to show a problem has been fixed. I can get the website to pull up current records using but when i click on the lik that should redirect the user to the update form which pulls up the record that the user clicked on i get this error:
    exception
    org.apache.jasper.JasperException: Exception in JSP: /updateIssue.jsp:151
    148:   <table align="center">
    149:     <tr valign="baseline">
    150:       <td nowrap align="right">Cpu:</td>
    151:       <td><input type="text" name="cpu" value="<%=(((IssueUpdate_data = IssueUpdate.getObject("cpu"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%>" size="32">
    152:       </td>
    153:     </tr>
    154:     <tr valign="baseline">
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.servlet.ServletException: [Microsoft][ODBC Driver Manager] Invalid cursor state
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
         org.apache.jsp.updateIssue_jsp._jspService(updateIssue_jsp.java:284)
         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:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
         sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
         sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
         sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(Unknown Source)
         sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(Unknown Source)
         sun.jdbc.odbc.JdbcOdbcResultSet.getString(Unknown Source)
         sun.jdbc.odbc.JdbcOdbcResultSet.getObject(Unknown Source)
         sun.jdbc.odbc.JdbcOdbcResultSet.getObject(Unknown Source)
         org.apache.jsp.updateIssue_jsp._jspService(updateIssue_jsp.java:226)
         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:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    My code for the page is:
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" %>
    <%@ include file="Connections/db.jsp" %>
    <%
    // *** Edit Operations: declare variables
    // set the form action variable
    String MM_editAction = request.getRequestURI();
    if (request.getQueryString() != null && request.getQueryString().length() > 0) {
      String queryString = request.getQueryString();
      String tempStr = "";
      for (int i=0; i < queryString.length(); i++) {
        if (queryString.charAt(i) == '<') tempStr = tempStr + "<";
        else if (queryString.charAt(i) == '>') tempStr = tempStr + ">";
        else if (queryString.charAt(i) == '"') tempStr = tempStr +  """;
        else tempStr = tempStr + queryString.charAt(i);
      MM_editAction += "?" + tempStr;
    // connection information
    String MM_editDriver = null, MM_editConnection = null, MM_editUserName = null, MM_editPassword = null;
    // redirect information
    String MM_editRedirectUrl = null;
    // query string to execute
    StringBuffer MM_editQuery = null;
    // boolean to abort record edit
    boolean MM_abortEdit = false;
    // table information
    String MM_editTable = null, MM_editColumn = null, MM_recordId = null;
    // form field information
    String[] MM_fields = null, MM_columns = null;
    %>
    <%
    // *** Update Record: set variables
    if (request.getParameter("MM_update") != null &&
        request.getParameter("MM_update").toString().equals("form1") &&
        request.getParameter("MM_recordId") != null) {
      MM_editDriver     = MM_db_DRIVER;
      MM_editConnection = MM_db_STRING;
      MM_editUserName   = MM_db_USERNAME;
      MM_editPassword   = MM_db_PASSWORD;
      MM_editTable  = "issue";
      MM_editColumn = "cpu";
      MM_recordId   = "'" + request.getParameter("MM_recordId") + "'";
      MM_editRedirectUrl = "COBA_home.html";
      String MM_fieldsStr = "cpu|value|issue|value|comment|value|issue_Date|value|Fixed|value";
      String MM_columnsStr = "cpu|',none,''|issue|',none,''|comment|',none,''|issue_Date|',none,''|Fixed|',none,''";
      // create the MM_fields and MM_columns arrays
      java.util.StringTokenizer tokens = new java.util.StringTokenizer(MM_fieldsStr,"|");
      MM_fields = new String[tokens.countTokens()];
      for (int i=0; tokens.hasMoreTokens(); i++) MM_fields[i] = tokens.nextToken();
      tokens = new java.util.StringTokenizer(MM_columnsStr,"|");
      MM_columns = new String[tokens.countTokens()];
      for (int i=0; tokens.hasMoreTokens(); i++) MM_columns[i] = tokens.nextToken();
      // set the form values
      for (int i=0; i+1 < MM_fields.length; i+=2) {
        MM_fields[i+1] = ((request.getParameter(MM_fields)!=null)?(String)request.getParameter(MM_fields[i]):"");
    // append the query string to the redirect URL
    if (MM_editRedirectUrl.length() != 0 && request.getQueryString() != null) {
    MM_editRedirectUrl += ((MM_editRedirectUrl.indexOf('?') == -1)?"?":"&") + request.getQueryString();
    %>
    <%
    // *** Update Record: construct a sql update statement and execute it
    if (request.getParameter("MM_update") != null &&
    request.getParameter("MM_recordId") != null) {
    // create the update sql statement
    MM_editQuery = new StringBuffer("update ").append(MM_editTable).append(" set ");
    for (int i=0; i+1 < MM_fields.length; i+=2) {
    String formVal = MM_fields[i+1];
    String elem;
    java.util.StringTokenizer tokens = new java.util.StringTokenizer(MM_columns[i+1],",");
    String delim = ((elem = (String)tokens.nextToken()) != null && elem.compareTo("none")!=0)?elem:"";
    String altVal = ((elem = (String)tokens.nextToken()) != null && elem.compareTo("none")!=0)?elem:"";
    String emptyVal = ((elem = (String)tokens.nextToken()) != null && elem.compareTo("none")!=0)?elem:"";
    if (formVal.length() == 0) {
    formVal = emptyVal;
    } else {
    if (altVal.length() != 0) {
    formVal = altVal;
    } else if (delim.compareTo("'") == 0) {  // escape quotes
    StringBuffer escQuotes = new StringBuffer(formVal);
    for (int j=0; j < escQuotes.length(); j++)
    if (escQuotes.charAt(j) == '\'') escQuotes.insert(j++,'\'');
    formVal = "'" + escQuotes + "'";
    } else {
    formVal = delim + formVal + delim;
    MM_editQuery.append((i!=0)?",":"").append(MM_columns[i]).append(" = ").append(formVal);
    MM_editQuery.append(" where ").append(MM_editColumn).append(" = ").append(MM_recordId);
    if (!MM_abortEdit) {
    // finish the sql and execute it
    Driver MM_driver = (Driver)Class.forName(MM_editDriver).newInstance();
    Connection MM_connection = DriverManager.getConnection(MM_editConnection,MM_editUserName,MM_editPassword);
    PreparedStatement MM_editStatement = MM_connection.prepareStatement(MM_editQuery.toString());
    MM_editStatement.executeUpdate();
    MM_connection.close();
    // redirect with URL parameters
    if (MM_editRedirectUrl.length() != 0) {
    response.sendRedirect(response.encodeRedirectURL(MM_editRedirectUrl));
    return;
    %>
    <%
    String IssueUpdate__MMColParam = "1";
    if (request.getParameter("cpu") !=null) {IssueUpdate__MMColParam = (String)request.getParameter("cpu");}
    %>
    <%
    Driver DriverIssueUpdate = (Driver)Class.forName(MM_db_DRIVER).newInstance();
    Connection ConnIssueUpdate = DriverManager.getConnection(MM_db_STRING,MM_db_USERNAME,MM_db_PASSWORD);
    PreparedStatement StatementIssueUpdate = ConnIssueUpdate.prepareStatement("SELECT * FROM issue WHERE cpu = '" + IssueUpdate__MMColParam + "' ORDER BY Fixed ASC");
    ResultSet IssueUpdate = StatementIssueUpdate.executeQuery();
    boolean IssueUpdate_isEmpty = !IssueUpdate.next();
    boolean IssueUpdate_hasData = !IssueUpdate_isEmpty;
    Object IssueUpdate_data;
    int IssueUpdate_numRows = 0;
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    <body>
    <form method="post" action="<%=MM_editAction%>" name="form1">
    <table align="center">
    <tr valign="baseline">
    <td nowrap align="right">Cpu:</td>
    <td><input type="text" name="cpu" value="<%=(((IssueUpdate_data = IssueUpdate.getObject("cpu"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%>" size="32">
    </td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Issue:</td>
    <td><input type="text" name="issue" value="<%=(((IssueUpdate_data = IssueUpdate.getObject("issue"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%>" size="32">
    </td>
    </tr>
    <tr>
    <td nowrap align="right" valign="top">Comment:</td>
    <td valign="baseline"><textarea name="comment" cols="50" rows="5"><%=(((IssueUpdate_data = IssueUpdate.getObject("comment"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%></textarea>
    </td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Issue_Date:</td>
    <td><input type="text" name="issue_Date" value="<%=(((IssueUpdate_data = IssueUpdate.getObject("issue_Date"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%>" size="32">
    </td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Fixed:</td>
    <td><input type="text" name="Fixed" value="<%=(((IssueUpdate_data = IssueUpdate.getObject("Fixed"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%>" size="32">
    </td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right"> </td>
    <td><input type="submit" value="Update record">
    </td>
    </tr>
    </table>
    <input type="hidden" name="MM_update" value="form1">
    <input type="hidden" name="MM_recordId" value="<%=(((IssueUpdate_data = IssueUpdate.getObject("cpu"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%>">
    </form>
    <p> </p>
    </body>
    </html>
    <%
    IssueUpdate.close();
    StatementIssueUpdate.close();
    ConnIssueUpdate.close();
    %>
    Any idea as to what I have done wrong because I am very confused right now. Thank you so much in advance for any help or advice

    I am confused as well.
    It would help if your data layer was separate from your display layer.
    The error suggests that you are attempting to extract a result from a update. And that won't work with a standard update.
    Where that is happening I have no idea.

  • ODBC Data Source Won't Recover from Connection Errors

    I have several ODBC data sources to a mainframe and want to
    use the "Maintain Connections" setting as it dramatically improves
    performance under heavy load. Problem is that we frequently have
    path problems between the CF server and the mainframe 180 miles
    away. With the Maintain Connections checked, the data source
    doesn't consistently start working again after the path problem
    clears up. The path problem usually only lasts a minute or two, but
    SOME queries through the affected data sources continue to raise
    errors until the ODBC Service is cycled. The SOME aspect is really
    weird because not every hit through that data source reports an
    error after the path comes back up. I've had side-by-side users hit
    the same page using that DS and one consistently get's an error and
    the other works fine. Restarting the ODBC service clears the
    problem so it works fine for everybody. Of course that breaks all
    the connections that were still working so I just affected a bunch
    more users. Silver lining there is that at least nobody can claim
    preferential treatment right. It's also kind of bizzare that I can
    use the CF Administrator to verify all data sources and they
    usually all report that they are working fine even while some
    connections are still reporting problems.
    The specific ODBC drivers we are using are Neon Shadow
    Drivers (Multi Threaded). I'm thinking about using the Admin API to
    hit the Disable Connections and then re-enable it.
    Any constructive, tactful input for addressing this problem
    would be appreciated.

    spikehenning wrote:
    > I have several ODBC data sources to a mainframe and want
    to use the "Maintain
    > Connections" setting as it dramatically improves
    performance under heavy load.
    > Problem is that we frequently have path problems between
    the CF server and the
    > mainframe 180 miles away. With the Maintain Connections
    checked, the data
    > source doesn't consistently start working again after
    the path problem clears
    > up. The path problem usually only lasts a minute or two,
    but SOME queries
    > through the affected data sources continue to raise
    errors until the ODBC
    > Service is cycled. The SOME aspect is really weird
    because not every hit
    > through that data source reports an error after the path
    comes back up. I've
    > had side-by-side users hit the same page using that DS
    and one consistently
    > get's an error and the other works fine. Restarting the
    ODBC service clears the
    > problem so it works fine for everybody. Of course that
    breaks all the
    > connections that were still working so I just affected a
    bunch more users.
    > Silver lining there is that at least nobody can claim
    preferential treatment
    > right. It's also kind of bizzare that I can use the CF
    Administrator to verify
    > all data sources and they usually all report that they
    are working fine even
    > while some connections are still reporting problems.
    >
    > The specific ODBC drivers we are using are Neon Shadow
    Drivers (Multi
    > Threaded). I'm thinking about using the Admin API to hit
    the Disable
    > Connections and then re-enable it.
    Do you have a JDBC Type 4 alternative for these drivers? I
    got rid of
    all my datasource problems long ago when I got rid of ODBC
    altogether.
    Jochem
    Jochem van Dieten
    Adobe Community Expert for ColdFusion

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

  • ODBC Data Source Aministrator - new data source- error - SAP BO XI 3.1 SP3

    Hello there,
    when adding a new mySQL data source to the ODBC Data Source Aministrator on the server we recieve the following error message:
    The setup routines for the MySQL ODBC 5.1 Driver ODBC driver could not be loaded due to system error code 126: The specified module could not be found.
    (C:\Windows\system32\myodbc5S.dll)
    Does anybody know how to solve that problem?
    Thanks in advance!
    Alex

    Hi,
    is the .dll in the designated path?
    Regards
    -Seb.

  • Invalid cursor state when trying to insert record

    Hi everyone!
    I'm using JDBC-ODBC bridge to connect to a mySql database, which works fine. Then I try to insert new records, but this only works for the first record in the table.
    When there is already a record in the table, I always get "[Microsoft][ODBC Driver Manager] Invalid cursor state" when calling the updateRow()-method of the result set.
    Here is my code:            // open db connection
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                Connection conn = DriverManager.getConnection("jdbc:odbc:TTManager", "xxxx", "xxxx");
                // Prepare SQL statement
                java.sql.Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
                ResultSet result = stmt.executeQuery("SELECT * FROM Player");
                result.moveToInsertRow();Then all fields are filled in this manner:            result.updateString("Name", name);And finally the insertRow should be written to the db:            result.insertRow();But at this point it gives the mentioned error, including these messages:         at sun.jdbc.odbc.JdbcOdbcResultSet.setPos(JdbcOdbcResultSet.java:5272)
            at sun.jdbc.odbc.JdbcOdbcResultSet.insertRow(JdbcOdbcResultSet.java:4132)Since I'm very unexperienced with Java, I guess (or hope^^) it's just some stupid beginner's mistake.
    Oh, almost forgot to mention: The new record's data doesn't violate any unique-constraints on the table, all fields are explicitely filled and all variable's data types are matching their according field types!
    Any help would be appreciated!
    reinski

    Ok, I needed to help myself and this is what I found out:
    If the table already contains records, it is not enough to doresult.moveToInsertRow();but I must beresult.last();
    result.moveToInsertRow();I didn't find any explanation and even the code examples from the Sun tutorial don't mention this, so I guess it's a bug occurring in my poor IT environment: DB server running mySQL 5.0.0-alpha on a P1-233-MMX w/ 64MB under WinNT4 (hey don't laugh!!^^).
    Maybe this information is of use to someone having similar problems...
    Greetings!
    reinski

  • Need help with **** Invalid Cursor State ****

    Hi,
    can someone tell me why am i getting this error....
    //******java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
    Any help is greatly appreciated.....
    Thanks in advance.
    //***********this is the output on servlet side**************//
    Starting service Tomcat-Standalone
    Apache Tomcat/4.0.3
    Starting service Tomcat-Apache
    Apache Tomcat/4.0.3
    init
    DBServlet init: Start
    DataAccessor init: Start
    Accessor init: Loading Database Driver: sun.jdbc.odbc.JdbcOdbcDriver
    DataAccessor init: Getting a connection to - jdbc:odbc:SCANODBC
    username SYSDBA
    password masterkey
    DataAccessor init: Preparing searchPolicy
    DataAccessor init: Prepared policySearch
    DataAccessor init: Prepared ssnSearch
    DataAccessor init: End
    After the myDataAccessor
    Database Connection...
    in doGet(...)
    SSSSSSSGetpolicynumber
    In GetPolicyInformation
    b05015195
    Getting Policy Informaton for = b05015195
    okay, building vector for policy
    in GetPolicyInformation for = b05015195
    starting query... policy Information
    finishing query... Policy Information
    Inside the while(next) loop
    sun.jdbc.odbc.JdbcOdbcResultSet@4db06e
    sun.jdbc.odbc.JdbcOdbcResultSet@4db06e
    b05015195
    policy information constructor with resultset
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
    at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3266)
    at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:
    5398)
    at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:326)
    at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:383)
    at viewscreenappletservlet.policyinformation.<init>(policyinformation.ja
    va:56)
    at viewscreenappletservlet.DatabaseAccessor.getPolicyInformation(Databas
    eAccessor.java:145)
    at viewscreenappletservlet.Servlet.policyDisplay(Servlet.java:108)
    at viewscreenappletservlet.Servlet.doGet(Servlet.java:91)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServl
    et.java:446)
    at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java
    :180)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
    torBase.java:475)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
    2343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
    rValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
    468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
    r.java:1012)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
    va:1107)
    at java.lang.Thread.run(Thread.java:484)
    result set closed
    1
    sending response
    Sending policy vector to applet...
    Data transmission complete.

    1) JDBC-ODBC driver is buggy
    2) Some drivers (truly speaking most of them) doesn't
    support cursors or supports them in a wrong way
    Paul

  • SQLException, invalid cursor state

    Came across the weirdest thing... Suppose i use this statement in a servlet:
    ResultSet result = statement.executeQuery("SELECT City FROM Destinations");and the following code in the JSP to which the browser is redirected:
    <select name="selectedCity" value="" size="1">
    <% ResultSet result = (ResultSet) session.getAttribute("rstCity");
    while (result.next()) { %>
         <option><%= result.getString(1) %>
    <% } %>
    </select>This works properly in my case. (Don't think other code is necessary to provide... please tell me you think it is..)
    But because result is full of duplicate rows, i want to change the line into:
    ResultSet result = statement.executeQuery("SELECT DISTINCT City FROM Destinations");A ServletException and SQLException message in the browser (at index.jsp, not servlet/servletname!) both say [Micrisoft][ODBC Driver Manager]Invalid Cursor State...
    Now if i (temporarily) remove the expression <%= result.getString(1) %> in the JSP file, the error no longer appears. Ofcourse the listbox <select> is now filled with about 100 empty <option>s...
    I can't locate the problem this way, can't see any logic in this. It seems like by adding DISTINCT in the SQL statement, the JSP file cannot handle the getString function anymore.
    Can anyone help me with this invalid cursor state thing?
    Thanks!!

    Peter,
    I'm getting the same problem with this:
    String sql = "SELECT DISTINCTROW collectedwho FROM steps WHERE status = 'overdue finish' AND escalatedwho = " + util.sqlEsc(username) + " ORDER BY collectedwho";
    recordset rs = new recordset();
    rs.open(sql);
    while (rs.rs.next()) {
    accountable = rs.rs.getString("collectedwho");
    (recordset is simply my own wrapper for the ResultSet class, which hides the db connection string and saves me rewriting it every time)
    What happens is that the loop falls off the end of the resultset but thinks that it hasn't, ie rs.next() returns true, but there's no data when it gets to the getString and it throws an "Invalid cursor state".
    Bummer.
    I'm using the JDBC:ODBC bridge to an access database, by the way.
    I tried changing DISTINCT to to DISTINCTROW which then worked with no errors but of course gave me the wrong results in the ResultSet!
    Is this a bug in the bridge, or in the ResultSet class?
    Sorry this isn't much help but at least you know you're not the only one!
    David

  • ?? Invalid Cursor State - Help needed in JSP.

    OK...here's the problem I have a page that loads the values from a database into input fields so as users could edit and update the data into the respective tables.
    But the problem is i get this error which I have never come accross before. So any help clarifying this would be much appreciated.
    The stack trace :
    500 Internal Server Error
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6106)
         at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6263)
         at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3307)
         at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:5492)
         at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:342)
         at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:399)
         at /abb/jspages/editCosting.jsp._jspService(/abb/jspages/editCosting.jsp.java:40) (JSP page line 13)
         at com.orionserver[Orion/2.0.2 (build 11157)].http.OrionHttpJspPage.service(.:70)
         at com.evermind[Orion/2.0.2 (build 11157)]._ay._rkb(.:5741)
         at com.evermind[Orion/2.0.2 (build 11157)].server.http.JSPServlet.service(.:31)
         at com.evermind[Orion/2.0.2 (build 11157)]._cub._pod(.:521)
         at com.evermind[Orion/2.0.2 (build 11157)]._cub._bmc(.:177)
         at com.evermind[Orion/2.0.2 (build 11157)]._ax._ltc(.:666)
         at com.evermind[Orion/2.0.2 (build 11157)]._ax._uab(.:191)
         at com.evermind[Orion/2.0.2 (build 11157)]._bf.run(.:62)By the way I am using Microsoft Access as the DB and Orion Server 2.0.2.

    sorry guys...It was me who's the stupid one gocha. Actually there error was caused by a typo i made in the rs.next codings.
    Since i just copied it from another well functioning coding i didn't check for typos in the coding. Maybe i accidentally pressed something on the keyboard.
    Thanks for the help guys..I really appreciate it.

  • Using Excel & ODBC data source to get data

    I've been using MS Excel to extract MS SQL Server data from our ERP system for years but we are now moving to Oracle 12i. What are my options in the Oracle world? Can it be configured much the same way; that is by configuring an ODBC data source and connecting directly to the database???
    Thanks in advance.

    user11307988 wrote:
    I've been using MS Excel to extract MS SQL Server data from our ERP system for years but we are now moving to Oracle 12i. What are my options in the Oracle world? Can it be configured much the same way; that is by configuring an ODBC data source and connecting directly to the database???
    Thanks in advance.Adding to sb92075's brief but accurate statement, from one of my recent presentations (note - no need for an ODBC connection):
    'Need to add a reference to Microsoft ActiveX Data Objects 2.8 Library before starting
    '*** This section might be in the top portion of the user form, worksheet code, or module:
    'Declare a connection object in the general section to hold the connection to the database
    Dim dbVMFG As ADODB.Connection
    'Declare a set of variables to hold the username and password for the database
    Dim strUserName As String
    Dim strPassword As String
    Dim strDatabase As String
    Dim i as Integer
    Dim intResult As Integer
    Dim strSQL as String
    Dim lngRow as Long
    On Error Resume Next
    strDatabase = "MyDB"
    strUserName = "MyUser"
    strPassword = "MyPassword"
    'Connect to the database
    'Oracle connection string
    Set dbVMFG = New ADODB.Connection
    dbVMFG.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source=" & strDatabase & ";User ID=" & strUserName & ";Password=" & strPassword & ";ChunkSize=1000;FetchSize=100;"
    dbVMFG.ConnectionTimeout = 40
    dbVMFG.CursorLocation = adUseClient
    dbVMFG.Open
    If (dbVMFG.State <> 1) Or (Err <> 0) Then
        intResult = MsgBox("Could not connect to the database.  Check your user name and password." & vbCrLf & Error(Err), 16, "Excel Demo")
    Else
        strSQL = "SELECT" & VBCrLf
        strSQL = strSQL & "  ID AS RESOURCE_ID," & VBCrLf
        strSQL = strSQL & "  DESCRIPTION" & VBCrLf
        strSQL = strSQL & "FROM" & VBCrLf
        strSQL = strSQL & "  MY_TABLE" & VBCrLf
        strSQL = strSQL & "WHERE" & VBCrLf
        strSQL = strSQL & "  DESCRIPTION LIKE '%10%'" & VBCrLf
        strSQL = strSQL & "ORDER BY" & VBCrLf
        strSQL = strSQL & "  ID"
        'Add a new worksheet to the new workbook, add after the last sheet
        ActiveWorkbook.Sheets.Add
        ActiveWorkbook.ActiveSheet.Name = "JustATest"
        snpData.Open strSQL, dbVMFG
        If snpData.State = 1 Then
            'Slow Method------------------------------------
            lngRow = 0
            'Header Row
            For i = 0 To snpData.Fields.Count – 1
                lngRow = lngRow + 1
                ActiveSheet.Cells(lngRow, i + 1).Value = snpData.Fields(i).Name
                ActiveSheet.Cells(lngRow, i + 1).Font.Bold = True
            Next i
            'Detail Rows
            Do While Not snpData.EOF
                lngRow = lngRow + 1
                For i = 0 To snpData.Fields.Count - 1
                    ActiveSheet.Cells(lngRow, i + 1).Value = snpData.Fields(i)
                Next i
                snpData.MoveNext
            Loop
            'End Slow Method------------------------------------
            'Fast Method----------------------------------------
            'Do not use this and the slow method!
            For i = 0 To snpData.Fields.Count - 1
                ActiveSheet.Cells(1, i + 1).Value = snpData.Fields(i).Name
            Next i
            ActiveSheet.Range(ActiveSheet.Cells(1, 1), ActiveSheet.Cells(1, snpData.Fields.Count)).Font.Bold = True
            ActiveSheet.Range("A2").CopyFromRecordset snpData
            'Auto-fit up to 26 columns
            ActiveSheet.Columns("A:" & Chr(64 + snpData.Fields.Count)).AutoFit
            'End Fast Method----------------------------------------
            snpData.Close
        End If
    End IfA couple of notes:
    1. Do not repeatedly connect to the database, execute a SQL statement, and disconnect from the database - connect once and stay connected.
    2. Use bind variables where possible in SQL statements for constants (literals) which might change from one execution to the next - let me know if you need s code example showing bind variable usage in Excel.
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Sorry to ask about Invalid Cursor State again...

    I am getting this error which is really frustrating because I can't figure out why it is happening.
    I am connecting to a csv file using jdbc:odbc Microsoft Text Driver.
    I instantiate the ReadFortySite class in the GUI class.I then click on a jList in my main GUI and this passes the selected object to the code below. It works fine the first time but if I try to select another jList element, it throws the Invalid Cursor State error..Any Ideas??
    public class ReadFortySite {
    private String file;
    private String path = null;
    private Connection conn = null;
    private Statement stmt;
    private ResultSet results, col_results;
    private ResultSetMetaData rsmd;
    private ArrayList test_names,columnHeads;
    private Object List_Selection;
    /** Creates a new instance of ReadFortySite */
    public ReadFortySite(String file) {
    this.file = file;
    ReadFile();
    public void ReadFile()
    try{
    //path = file.getPath();
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    // create a connection.
    /* NEED 2 TAKE HARD CODED VALUE OF E: OUT!!!! */
    conn = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=E:/;Extensions=csv");
    // create a Statement object to execute the query with
    stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    // Select everything from the specified csv file
    results = stmt.executeQuery("SELECT * from ("+file+")");
    //ArrayLists used to manipulate and hold test name values
    columnHeads = new ArrayList();
    // get column heads
    rsmd = results.getMetaData();
    for ( int i = 4; i <= rsmd.getColumnCount(); i++ ) {
    columnHeads.add( rsmd.getColumnName( i ) );
    }//end try
    catch(Exception e)
    System.out.println("Error " + e);
    }//end method
    public ArrayList getArrayList()
    return columnHeads;
    public ArrayList getTestValues(Object obj){
    ArrayList TestValues = new ArrayList();
    try{
    List_Selection = obj;
    //have an object representing the value selected
    //need to get test results associated with that value
    for(int i=1;i<rsmd.getColumnCount()+1;i++)
    if(obj.equals((Object)rsmd.getColumnName(i)))
    while(results.next()){
    String vals = results.getString((String)obj);
    TestValues.add(vals);
    //System.out.println(TestValues.toString());
    }//end while
    }//end for
    }//end try
    catch (SQLException sqle)
    System.out.println("Error " + sqle);
    return TestValues;
    }

    You should use code formatting when you post code, and you should also post the stack trace that you get when you run the code.
    /Kaj

  • Problem using excel file as odbc data source

    hi, I have followed the instruction in
    "Creating a Repository Using the Oracle Business Intelligence Administration Tool"
    [http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/bi_admin/biadmin.html]
    and established a odbc data source using an excel file.
    however, I found that the Microsoft Excel Driver always unable to handle complex column formula.
    for example,
    FILTER(sourceTable$.NoOfItem USING (sourceTable$.Kind = 'Lemon'))
    when there are two columns using FILTER, there is an error about the ODBC driver.
    =============================================================
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 16001] ODBC error state: 37000 code: -3100 message: [Microsoft][ODBC Excel Driver] Syntax error (missing operator) in query expression 'sum(case when T3552.[Kind] = 'Orange' then T3552.[NoOfItem] end )'.. [nQSError: 16014] SQL statement preparation failed. (HY000)
    SQL Issued: SELECT "sourceTable$".Market saw_0, FILTER("sourceTable$".NoOfItem USING ("sourceTable$".Kind = 'Orange')) saw_1, FILTER("sourceTable$".NoOfItem USING ("sourceTable$".Kind = 'Lemon')) saw_2 FROM excel_source ORDER BY saw_0
    =============================================================
    However, I change the data source using SQL SERVER, no error occurs and it shows the result correctly.
    how to slove this problem?

    I have the same issue. Does anyone know how to solve it?

Maybe you are looking for