Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default recordset vs collection

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 the data 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default recordset vs collection

Only if same record is accessed by multiple users,there is a chance it will error.
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.

On Thursday, 13 February 2014 16:07:13 UTC+5:30, Keith Willis wrote:
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 the data 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default recordset vs collection

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I check a collection (e.g. worksheets) collection to be empty? Michiel via OfficeKB.com Excel Programming 2 March 25th 10 03:22 PM
Cannot use recordset twice with copy From recordset JasonC Excel Programming 1 February 4th 10 12:53 AM
Recordset's RowID as part of Recordset Trip[_3_] Excel Programming 3 November 22nd 05 11:49 PM
Type recordset/recordset? FlaviusFlav[_9_] Excel Programming 4 May 24th 04 12:16 PM


All times are GMT +1. The time now is 08:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"