I want to append records to a table using the ADO Recordset. I create my recordset with SELECT * FROM Tablename. The problem is this retrieves all the records before I can do my AddNew's and some tables are massive! How can I do this without retrieving any records? How do you use the "Append-only Rowset" property?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


It depends on the Provider you are using - it may not support opening recordsets as append-only.

Are you using Command objects or RecordSet objects to open the recordset ?
The following code snippet might help (no guarantees that it will work)

'assumes connected to datasource using  
'ADODB.Connection "conn"
set myrecordset = new adodb.recordset
set myrecordset.activeconnection = conn

'if you examine (watch) the properties collection of
'MyRecordSet here, you should see whether the
'"append only rowset" property is supported/listed
'under Jet 4.0 provider it was property 55 or so"Append only rowset").value = true
call"select * from TABLE")


Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
select * from customermaster where 1=2
Give some condition like the above one, which is not matched (1 can never be equal to 2). Hence you always get an empty recordset.

You can add records to this recordset.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.