Q: How to create an empty ADO Recordset? 
Author Message
 Q: How to create an empty ADO Recordset?
I have developed a set of components in VC++ that return a collection of ADO
Recordset. I'm populating these recordsets with the XML DSO control.
Sometimes I have to return recordsets that are empty (i.e. get_EOF always
returns true). I have tried defferent ways of creating these recordsets with
no luck.

Does anybody know how I could accomplish this?

Thanks

Martin Bertolino
TALX Coproration



Sun, 24 Mar 2002 03:00:00 GMT
 Q: How to create an empty ADO Recordset?

Martin,
    I'm no proficient in VC++, but in VB we can either:
        a) Query a database with a WHERE 1=0 clause, or
        b) Make a programmatic recordset (rs.Fields.Append ...) and append
no data.

    Maybe this can guide you to the proper function calls in your
documentation.

Regards,
Eric Garza


Quote:
> I have developed a set of components in VC++ that return a collection of
ADO
> Recordset. I'm populating these recordsets with the XML DSO control.
> Sometimes I have to return recordsets that are empty (i.e. get_EOF always
> returns true). I have tried defferent ways of creating these recordsets
with
> no luck.

> Does anybody know how I could accomplish this?

> Thanks

> Martin Bertolino
> TALX Coproration



Sun, 24 Mar 2002 03:00:00 GMT
 Q: How to create an empty ADO Recordset?
To create an empty Rowset simply create an instance of CLSID_ADORecordset

 IADORecordset *pRecordset ;
 hr = CoCreateInstance(CLSID_ADORecordset, NULL,
CLSCTX_INPROC,  IID_IADORecordset,
(void **) &pRecordset) ;

Now just pass the pRecordset to the client.

I hope this helps.

Jim


Quote:
> I have developed a set of components in VC++ that return a collection of
ADO
> Recordset. I'm populating these recordsets with the XML DSO control.
> Sometimes I have to return recordsets that are empty (i.e. get_EOF always
> returns true). I have tried defferent ways of creating these recordsets
with
> no luck.

> Does anybody know how I could accomplish this?

> Thanks

> Martin Bertolino
> TALX Coproration



Sun, 24 Mar 2002 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. SQLServer ADO - insert into select - causes empty recordsets to be created

2. Creating an empty ADO Recordset

3. Q: How to create an empty ADO Recordset?

4. How to create empty recordset

5. How do I create an empty recordset

6. Can you create an empty recordset?

7. Creating an empty recordset

8. Creating an empty recordset (but linked to a table)

9. Create empty recordset ?

10. Create empty recordset?

11. empty recordset (ADO) with an SQL query!

12. empty recordset in ADO/ASP


 
Powered by phpBB® Forum Software