If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Cursor engine and E_FAIL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
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.
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Feb 2002
Posts: 2,232
What is the statement in your code that is causing this error ? Are you using xp_sendmail ?
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Aug 2002
Posts: 2
Quote:
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?
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
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 ?
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
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,
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
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!
Reply With Quote
  #7 (permalink)  
Old
Registered User
 
Join Date: Feb 2003
Location: Washington, DC
Posts: 2
Talking

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On