View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Robin Hammond[_2_] Robin Hammond[_2_] is offline
external usenet poster
 
Posts: 575
Default RecordSet & New Class - Good idea?

Alan,

Can I ask why you need to put the data in a worksheet anyway? You already
have the data in the ADODB class library, which allows you to access each
field using the recordset object. Surely there is no need to create an
additional class that will just replicate part of what you can do using the
recordset.

Robin Hammond
www.enhanceddatasystems.com

"Alan" wrote in message
...

Hi All,

I have the following situation:

A database held in an access mdb file. The data is pulled out into an
excel front-end by use of a RecordSet object (CopyFromRecordSet
is used to populate a worksheet range).

There are about 1600 records currently (growing) and 32 fields per
record (about 50,000 data points).

Changes made to the worksheet are then transferred back to the mdb
using the update method of the recordset object. Users do not access
the worksheet directly - data is presented to them in a userform that
they amend if necessary and then update to the worksheet (which then
goes back to the mdb).

The reason for the Excel front end is that it already exists (the
original data was stored in a worksheet and later moved to an mdb due
to issues with shared workbooks being flaky), it works, and we don't
really want to invest time and effort to replicate something that is
already there.


Question:

Would it be better to avoid puttig the data into a worksheet range,
and instead create a new class object containing each of the records,
with the fields being properties of the objects?

Would it be faster / better?


Thanks for any comments you have. If you need more information,
please do post a question - I have tried to give the salient points
without going into too much detail, but not having used classes before
I may be missing a point somewhere!

Thanks,

Alan.