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
|