Data provider or other service returned an E_FAIL status

Posted on 2006-04-03
Last Modified: 2012-06-27
I am getting the following error when running a page against  a SQL Server database. When I run the page against my local copy of SQL Server, there is no problem.
Error Type:
Microsoft Cursor Engine (0x80004005)
Data provider or other service returned an E_FAIL status.
/tsac/tsacsearch/POSearchResult.asp, line 168
Here is the code snippet that may be the cause of the problem:

Set rec = Server.CreateObject("ADODB.Recordset")
rec.CursorLocation = 3 '=adUseClient
rec.PageSize = intPageSize

rec.Open cmd,,3,3

'rec.Open cmd

intPageCount = rec.PageCount (Line 168)

Reccount = rec.RecordCount

Question by:cityside
    LVL 25

    Assisted Solution

    Make sure to have the latest MDAC installed on the server and clients.

    this error can also be caused by a NULL value in the WHERE statement of your query
    LVL 52

    Accepted Solution

    This guy had the same problem, maybe it will be of use to you:
    LVL 25

    Expert Comment

    why the C grade?
    LVL 1

    Author Comment

    why the C grade? Because it didn't solve the problem.
    I  gave you the points anyway. What more do you want?
    LVL 1

    Author Comment

    Fair enough.
    I'll remember that in future.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    732 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

    24 Experts available now in Live!

    Get 1:1 Help Now