copy a recordset's page to another recordset 
Author Message
 copy a recordset's page to another recordset
I would like to copy one page of a mutli-page recordset to a second,
disconnected recordset.  What is the most efficient way to do this?

My goal is to save the second recordset to XML.  I don't want more than one
page of records in the xml.  Saving the first recordset would include all
pages.

Thanks,

Craig Buchanan | President | Cogniza
Business Intelligence Experts
Crystal Decisions-Certified Consultant
+01.612.824.5858 X1 | www.cogniza.com



Tue, 04 May 2004 10:23:01 GMT
 copy a recordset's page to another recordset

Hi Craig,

You cannot save just particular page. So you need to loop
trough records of your page and copy them record by record
into another disconnected recorset.
If you have same fields' names in both recordsets then you
can copy records next way

do while 'put condition here to number of records to copy
loDestinationRecordset.AddNew

   For i = 0 To SourceRecorset.fields.Count - 1
       loDestinationRecordset.fields(SourceRecorset.fields
(i).Name).Value = SourceRecorset.fields.Item(i).Value
   Next i

Loop

Val

Quote:
>-----Original Message-----
>I would like to copy one page of a mutli-page recordset
to a second,
>disconnected recordset.  What is the most efficient way
to do this?

>My goal is to save the second recordset to XML.  I don't
want more than one
>page of records in the xml.  Saving the first recordset
would include all
>pages.

>Thanks,

>Craig Buchanan | President | Cogniza
>Business Intelligence Experts
>Crystal Decisions-Certified Consultant
>+01.612.824.5858 X1 | www.cogniza.com

>.



Tue, 04 May 2004 20:47:01 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Large Recordset - web - multiple pages per recordset

2. Quickest Way to copy DB1.recordset to DB2.recordset

3. Copying a part recordset to a new recordset

4. Quickest Copy of DB1.recordset into DB2.Recordset

5. Manipulating a recordset from a DataGrid's Recordset property

6. Copy from recordset doesn't work

7. Recordset.Close, set Recordset = Nothing vs set Recordset = Nothing

8. Recordset paging when sql comes from form on same page

9. 'locking' a recordset

10. 'Recordset is Readonly ' Error

11. ADODB.Recordset error '800a0bb9'

12. Access 2000 'recordset not updatable'


 
Powered by phpBB® Forum Software