Question

I there a simple way to append a new field to an existing open ADO RecordSet?

fields.append() won't work if the RecordSet is open, and closing appears to kill the existing data.

NB: I'm using Microsoft ActiveX DataObject 2.8 Library

Was it helpful?

Solution

You can't append fields to a recordset while it's open.

You can create a clone of the recordset, append your required fields, open it and copy the data from the original.

The other option is to persist the recordset as xml, modify the rowset schema, add required fields & then load xml into a new recordset.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top