Results 1 to 2 of 2

Thread: Requested operation requires an OLE DB Session object

  1. #1

    Thread Starter
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    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:
    1. Function ConnectDatabase()
    2.         If Not objConnection.State = adStateOpen Then
    3.             On Error Resume Next
    4.             objConnection.ConnectionString = ConnectionString
    5.             objConnection.Open()
    6.             objConnection.ConnectionString = ConnectionStringForOuterPages
    7.             objConnection.Open()
    8.         End If
    9.     End Function
    10.  
    11.     Function ExecuteReader(Sql)
    12.         Dim objCommand     
    13.         Dim objRecordset
    14.         Set objCommand = Server.CreateObject("Adodb.Command")
    15.         Set objRecordset = Server.CreateObject("Adodb.Recordset")
    16.        
    17.         objRecordset.CursorType = adOpenDynamic
    18.         objRecordset.LockType = adLockOptimistic
    19.         objRecordset.CursorLocation = adUseClient
    20.        
    21.         ConnectDatabase()
    22.         objCommand.ActiveConnection = objConnection
    23.         objCommand.CommandText = Sql
    24.         objCommand.CommandType = adCmdText
    25.         Set objRecordset = objCommand.Execute()
    26.  
    27.         Set ExecuteReader = objRecordset
    28.     End Function

    Thanks.

  2. #2
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    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
    Truly, you have a dizzying intellect.

Posting Permissions

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



Click Here to Expand Forum to Full Width