APPENDONLY Recordset

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?
johnieAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

grumpy147Commented:
Hi,

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

myrecordset.properties.item("Append only rowset").value = true
call myrecordset.open("select * from TABLE")
....


Laurence

Experts Exchange Solution brought to you by

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
tg_georgeCommented:
select * from customermaster where 1=2
tg_georgeCommented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.