Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2002
    Posts
    2

    Cursor engine and E_FAIL

    I am getting the following error on one of my ASP pages:

    Error Type:
    Microsoft Cursor Engine (0x80004005)
    Data provider or other service returned an E_FAIL status.

    I have no idea how to fix the problem, especially because the code exists on three other pages that are working fine. It happened once before and I don't remember what I did except move the cursor assignment, which didn't help because it messed up other code. Any suggestions would be greatly appreciated.

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    What is the statement in your code that is causing this error ? Are you using xp_sendmail ?

  3. #3
    Join Date
    Aug 2002
    Posts
    2
    Originally posted by rnealejr
    What is the statement in your code that is causing this error ? Are you using xp_sendmail ?
    This is the code that is causing the problem:

    'explicitly create a recordset object
    set rstPanning = Server.CreateObject("ADODB.Recordset")
    'set cursor location property
    rstPanning.CursorLocation = adUseClient
    'set cache size equal to # records/page
    rstPanning.CacheSize = NUM_PER_PAGE
    'open recordset
    rstPanning.Open strPanningSQL,AbTechconn

    'rstPanning.MoveFirst
    rstPanning.PageSize = NUM_PER_PAGE

    'get max number of pages
    Dim TotalPages
    TotalPages = rstPanning.PageCount
    'set absolute pages
    rstPanning.AbsolutePage = CurPage

    After I open the recordset, every reference to it causes the error (like the CacheSize assignment). It just doesn't make any sense because this code is identical on other pages that are working and I copied the code from an article on pagination. Do you know what this error means?

  4. #4
    Join Date
    Feb 2002
    Posts
    2,232
    How is NUM_PER_PAGE defined ? Also, how are you referencing the vb constants like adUseClient ? What database are you hitting ? What is your query ?

  5. #5
    Join Date
    Feb 2003
    Location
    Washington, DC
    Posts
    2

    Cursor engine and E_FAIL

    Did you ever get a resolution to your post. I am having the same issue and I can't find a work around. Hope you don't mind my asking.

    thanks,

  6. #6
    Join Date
    Apr 2003
    Posts
    1

    Lightbulb

    Take out this line of code
    conn.CursorLocation = adUseClient
    I was getting the same error only with my "SELECT * FROM table" statements. I took out the cursorlocation and no more error! Imagine that!

  7. #7
    Join Date
    Feb 2003
    Location
    Washington, DC
    Posts
    2

    Talking

    Thanks for your reply! Works fine now. That one was really frustrating, thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •