Accessing records through Recordset Pointer
-
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.
-
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.
-
Did you AddRef the recordset pointer before you returned it? Phil Boyd MCP "I took the road less traveled..."
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.