Click to See Complete Forum and Search --> : Ado and com in c++(returning recordset ptr)


Ram
May 10th, 1999, 06:15 AM
Hi, i need u'r help in ado.
I have to built a 3-tier application using com with c++, with Mssql as backend. For that i have to pass recordset pointer to the user tier so that he can manupulate the data dirrectly.

Using Msado15.dll we were able to send the recordset pointer but unable to access the recordset from the client.

this is my idl file declararion.

HRESULT GetByID ([in]BSTR pd,[out] _Recordset **ptrs)

importing msado15.idl file in the idl file complies the idl perfectly.
but the cpp asks for its msado15.h file but when we include that , it gives error.

and also we tried with LPDISPATCH instead of _Recordset though we get the recordset ptr in client we were not able to access the recordset.

sincerely,
ram




ram

ksheeraj
May 14th, 1999, 02:19 AM
You can pass LPIUNKNOWN as a return value to client.And then client will extract the right pointer .At the client side cast it as a desired pointer.
Give your e-mail ID.I will write you complete code from the office.
Ksheeraj

39639,Leslie St.
Apt #157
Fremont USA 94538