Microsoft documentation (SQLPrepare - ODBC - "invalid cursor state")

Posted on 2005-04-15
Last Modified: 2008-02-01
Hi experts,

If you look online at the documentation for SQLPrepare under the error for "invalid cursor state", you'll see this explanation:

"(DM) A cursor was open on the StatementHandle, and SQLFetch or SQLFetchScroll had been called.
A cursor was open on the StatementHandle, but SQLFetch or SQLFetchScroll had not been called."

It sounds as if you're screwed either way...

Can anyone please tell me what that's supposed to mean??

Question by:mikexpert
    1 Comment
    LVL 75

    Accepted Solution

    The part you may have skipped is:
    the notation "(DM)" precedes the descriptions of SQLSTATEs returned by the Driver Manager.

    In any case, why don't you tell us what is the real problem, as we could discuss all day the vagaries of MS documentation?

    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
    The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
    Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now