ADO Recordset 
Author Message
 ADO Recordset

How do i return a recordset ??

I am trying to return an ADO recordset as follows

.idl file

 interface IPublisher : IDispatch
 {
[id(1), helpstring("method GetPublishers")] HRESULT GetPublishers([in, out]
_Recordset** pRecset);
 };

.h file

public:
 STDMETHOD(GetPublishers)(/*[in, out]*/ _Recordset** pRecset);

.cpp file

STDMETHODIMP CPublisher::GetPublishers(_Recordset** pRecset)
{
 // TODO: Add your implementation code here

return S_OK;

Quote:
}

While compiling i get

:\BINU\VC++TEST\busPublisher\busPublisher.idl(20) : error MIDL2025 : syntax
error : expecting a type specification near "_Recordset"
c:\BINU\VC++TEST\busPublisher\busPublisher.idl(20) : error MIDL2026 : cannot
recover from earlier syntax errors; aborting compilation
Error executing midl.exe.



Sat, 27 Jul 2002 03:00:00 GMT  
 ADO Recordset
Thanx guys

i got the answer. i imported helper.idl which contains import "msado15.idl"

Shelly


Quote:
> How do i return a recordset ??

> I am trying to return an ADO recordset as follows

> .idl file

>  interface IPublisher : IDispatch
>  {
> [id(1), helpstring("method GetPublishers")] HRESULT GetPublishers([in,
out]
> _Recordset** pRecset);
>  };

> .h file

> public:
>  STDMETHOD(GetPublishers)(/*[in, out]*/ _Recordset** pRecset);

> .cpp file

> STDMETHODIMP CPublisher::GetPublishers(_Recordset** pRecset)
> {
>  // TODO: Add your implementation code here

> return S_OK;
> }

> While compiling i get

> :\BINU\VC++TEST\busPublisher\busPublisher.idl(20) : error MIDL2025 :
syntax
> error : expecting a type specification near "_Recordset"
> c:\BINU\VC++TEST\busPublisher\busPublisher.idl(20) : error MIDL2026 :
cannot
> recover from earlier syntax errors; aborting compilation
> Error executing midl.exe.



Sat, 27 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem with ADO recordsets of recordsets under MTS

2. Speed of ADO Recordset vs ADO Command in VC

3. ADO.Stream and ADO.RecordSet

4. Problems getting values from ADO Recordset

5. Exception thrown when opening ADO recordset

6. Using ADO recordset binding to retrieve BLOBs

7. how to call MyFunction(VARIANT* pRs) passing in ADO recordset

8. ADO Recordset.Update crash on a multiprocessor machine

9. ADO Recordset Status after SELECT...INTO

10. Open Emtpy ADO Recordset

11. how to send ADO recordset from VB to VC client

12. Create and append an ADO Recordset in VC++

 

 
Powered by phpBB® Forum Software