Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 5th, 2004, 03:06 PM
Registered User
 
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft Cursor Engine error '80004005'

I'm receiving the following error:

Microsoft Cursor Engine error '80004005'
Data provider or other service returned an E_FAIL status.
/sedicedemi.asp, line 139

I haven't touched that page, but my webhost provider had a big crash a week ago, and since then I'm having this error.

These are the versions that they have installed:
MDAC: 2.8
ADO: 4.00.6205.00
JET: 4.0.8618.0

And this is my script:
Dim iPageSize 'How big our pages are
Dim iPageCount 'The number of pages we get back
Dim iPageCurrent 'The page we want to show
Dim strOrderBy 'A fake parameter used to illustrate passing them
Dim strSQL 'SQL command to execute
Dim objPagingRS 'The ADODB recordset object
Dim iRecordsShown 'Loop controller for displaying just iPageSize records
Dim I 'Standard looping var

Dim objRsChild '-- The ADO Child Recordset (Titles)
Dim strShape '-- The SHAPE Syntax

' Get parameters
iPageSize = 3 ' You could easily allow users to change this

' Retrieve page to show or default to 1
If Request.QueryString("page") = "" Then
    iPageCurrent = 1
Else
    iPageCurrent = CInt(Request.QueryString("page"))
End If

If Request.QueryString("order") = "" Then
    strOrderBy = "eve_fecha DESC"
Else
    strOrderBy = Request.QueryString("order")
End If

'-- Create the Data Shape
strShape = ""
strShape = strShape & "SHAPE {SELECT * FROM Eventos ORDER BY " & strOrderBy & " } "
strShape = strShape & "APPEND ({SELECT * FROM Comentarios } "
strShape = strShape & "RELATE IdEvento TO IdEvento) as chTitle "

' Now we finally get to the DB work...
' Create and open our connection
Set objPagingConn = ConnectDb("sedicedemi", "shape")

' Create recordset and set the page size
Set objPagingRS = Server.CreateObject("ADODB.Recordset")
Set objRsChild = Server.CreateObject("ADODB.Recordset")

objPagingRS.PageSize = iPageSize

' You can change other settings as with any RS
'objPagingRS.CursorLocation = adUseClient
objPagingRS.CacheSize = iPageSize

And this is the line where the scripts generate the error:
' Open RS
#139: objPagingRS.Open strShape, objPagingConn, adOpenStatic, adLockReadOnly, adCmdText

BTW... here's the ConnectDb() function...

Function ConnectDb( dbName, strIsShape )

  Dim objDbConn
  Dim strPath
  Dim strCon

  Set objDbConn = Server.CreateObject("ADODB.Connection")

  Select Case Trim(LCase(dbName))
  Case "sedicedemi"
     strPath = "/scripts/db/sedicedemi.mdb"

  End Select

  If strIsShape = "shape" Then
    '-- Define the Shape Provider
    ' strCon = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="& Server.MapPath("/") & strPath
    'objDbConn.Provider = "MSDataShape"

    strCon = "Provider=MSDataShape;Data Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & Server.MapPath("/") & strPath

  Else

    strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & Server.MapPath("/") & strPath

  End If

  objDbConn.Open strCon

  Set ConnectDb = objDbConn

End Function

Any ideas????

Thansk in advance!

-- Gabriel
 
Old November 6th, 2004, 04:45 PM
Registered User
 
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by gmr1970
 I'm receiving the following error:

Microsoft Cursor Engine error '80004005'
Data provider or other service returned an E_FAIL status.
/sedicedemi.asp, line 139

I haven't touched that page, but my webhost provider had a big crash a week ago, and since then I'm having this error.
I finally solved the bug myself.

The database file (mdb, Access 2000) was corrupted. I restore it from a back-up and now everything's fine.

-- Gabriel





Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Error: Microsoft Jet Engine asters ASP.NET 1.0 and 1.1 Professional 2 April 3rd, 2007 09:33 AM
Microsoft JET Database Engine error '80040e4d' schuh.mike Access ASP 1 November 26th, 2006 06:30 PM
Microsoft JET Database Engine error '80040e10' froggzrevenge Classic ASP Databases 2 January 10th, 2005 12:44 AM
Microsoft JET Database Engine error '80040e14' aprnip Classic ASP Databases 2 November 15th, 2004 02:06 AM
Microsoft JET Database Engine error '80040e07' aprnip Classic ASP Databases 1 October 22nd, 2004 07:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.