recordset vs collection

  • Thread starter Thread starter Keith Willis
  • Start date Start date
K

Keith Willis

Hi all

I'm developing a project thats going to be a excel front end to a SQL db. One part of the required functionality is that you performa a search on the database and return possibly mutliple records for review or amendment on a userform. Normally i read data from a recordset into a collection so i'm not constantly requerying the db, but it's occoured to me for this that if i use a collection and close the recordset then it';s concievably possible that another user might access one of the already open records and change thedata leading to a concurrancy problem. Would using a recordset to return the results and use as the source for the data displayed in the form solve this problem?

Thanks

Keith
 
Only if same record is accessed by multiple users,there is a chance it willerror.
You can introduce a key field and for records in review you can tick them while it's open. If record is ticked no other user can modify the records,but view is closed key field can be unchecked.
 
Adding the extra overhead by loading a recordset into a collection
isn't very practical, IMO, because you can manipulate the recordset
much easier via ADO. Kind of makes the extra step to populate a
collection a waste of time/resources. My point assumes you use ADO to
read/write the data in the SQL db!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 
Back
Top