Requested operation requires an OLE DB Session object
Hello everybody,
My site is working fine on local systems, but when I uploaded it to the hosting server, it gives following error.
Code:
ADODB.Command error '800a0e7d'
Requested operation requires an OLE DB Session object, which is not supported by the current provider.
/motorcarbeta/include/database.asp, line 35
This is how I am trying to fetch the data.
VB Code:
Function ConnectDatabase()
If Not objConnection.State = adStateOpen Then
On Error Resume Next
objConnection.ConnectionString = ConnectionString
objConnection.Open()
objConnection.ConnectionString = ConnectionStringForOuterPages
objConnection.Open()
End If
End Function
Function ExecuteReader(Sql)
Dim objCommand
Dim objRecordset
Set objCommand = Server.CreateObject("Adodb.Command")
Set objRecordset = Server.CreateObject("Adodb.Recordset")
objRecordset.CursorType = adOpenDynamic
objRecordset.LockType = adLockOptimistic
objRecordset.CursorLocation = adUseClient
ConnectDatabase()
objCommand.ActiveConnection = objConnection
objCommand.CommandText = Sql
objCommand.CommandType = adCmdText
Set objRecordset = objCommand.Execute()
Set ExecuteReader = objRecordset
End Function
Thanks.
Re: Requested operation requires an OLE DB Session object
check your connectionstring path
many times the path to the DB on your local is different than the host server
look into server.mappath