Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Accessing records through Recordset Pointer

Accessing records through Recordset Pointer

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionc++
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yamini
    wrote on last edited by
    #1

    Hi , I have ATL Component with it's interface exposing a method which will pass the Disconnected Recordset pointer. At the client side,I can get this Recordset pointer.But, I could not access this Recordset Pointer as it gives error that "The operation requested by the application is not allowed if the object is closed ".I should not create another Recordset pointer on the client side.How can I rectify the problem ? Thanx in advance for the help. Regards, yamini.

    P 1 Reply Last reply
    0
    • Y yamini

      Hi , I have ATL Component with it's interface exposing a method which will pass the Disconnected Recordset pointer. At the client side,I can get this Recordset pointer.But, I could not access this Recordset Pointer as it gives error that "The operation requested by the application is not allowed if the object is closed ".I should not create another Recordset pointer on the client side.How can I rectify the problem ? Thanx in advance for the help. Regards, yamini.

      P Offline
      P Offline
      Phil Boyd
      wrote on last edited by
      #2

      Did you AddRef the recordset pointer before you returned it? Phil Boyd MCP "I took the road less traveled..."

      Y 1 Reply Last reply
      0
      • P Phil Boyd

        Did you AddRef the recordset pointer before you returned it? Phil Boyd MCP "I took the road less traveled..."

        Y Offline
        Y Offline
        yamini
        wrote on last edited by
        #3

        Hi, I tried to AddRef the Recordset pointer before returning . But, it did not work. The function prototype at Server . HRESULT GetAllElements([out,retval]_Recordset **ppRecordset); The code at the client goes this way. void main() { //Creating an instance of the Component and getting the Interface say Idemo _Recordset *ppRecordset; Idemo->GetAllElements(&ppRecordset); if(SUCCEEDED(hr)) { ppRecordset->MoveFirst //Here I am getting the Error that if object is closed can't do the operation requested by the Application. } } I must not create another Recordset at the Client side . Thanx in advance for the help. Regards, yamini.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups