Microsoft OLE DB Provider for SQL Server error '80040e14'  Could not find prepared statement with handle -1

Posted on 2011-10-12
Last Modified: 2012-05-12
I get this error intermittently on this page that loads a table off SQL.
Sometimes it comes up sometimes it doesn't.
No change in data, just refresh the page after initially seeing the error on occasion.
Refresh then error goes away and then refresh or initially land on page error may comes back up.

Experts please help?

Thank you in advance,


Microsoft OLE DB Provider for SQL Server error '80040e14'
Could not find prepared statement with handle -1.
line 167

163  ' reset the cursor to the beginning
164 If (MM_rs.CursorType > 0) Then
165  MM_rs.MoveFirst
166 Else
167   MM_rs.Requery
168   End If
Question by:colonelblue
    LVL 15

    Accepted Solution

    well... somehow the sql query is not saved in the MM_rs so you will need to provide it again or find where it is getting lost

    Author Closing Comment

    Thank you!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Viewers will learn how the fundamental information of how to create a table.
    Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

    779 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

    13 Experts available now in Live!

    Get 1:1 Help Now