473,666 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DAO Recordset: Getting by dirty records

Megalog
378 Recognized Expert Contributor
Hey all, I have a minor issue I'm trying to figure out (using Access 2007).

I'm using a DAO recordset to update a table ("Writeups") , with the results of a bunch of functions I've written up over the last few days. It all works great, except that when we run it while employees are logged in, there's the possibility of a write conflict on their end if they happen to be working on the form.

Is there a way for me to detect if that record is currently open elsewhere? I understand the 'dirty' event is a form-level property, so I wouldnt be able to actually see if someone has changed anything on the client side before they saved the record.

Ideally we want to avoid the end user getting the write conflict dialog box by skipping the update to that record during this recordset procedure.
These are the variations I have tried so far with no luck:

Expand|Select|Wrap|Line Numbers
  1. Set rstBatchSeek = CurrentDb.OpenRecordset("Writeups", dbOpenDynaset)
  2.  
  3. Set rstBatchSeek = CurrentDb.OpenRecordset("Writeups", dbOpenDynaset, dbSeeChanges)
  4.  
  5. Set rstBatchSeek = CurrentDb.OpenRecordset("Writeups", dbOpenDynaset, dbSeeChanges, dbPessimistic)
The dbSeeChanges value sounds like the answer to this, but it didnt do anything different.
From the help file: dbSeeChanges - Generates a run-time error if another user is changing data you are editing (dynaset-type only).

Any tips would be appreciated!
Jan 18 '08 #1
2 3072
Delerna
1,134 Recognized Expert Top Contributor
Maybe you could arrange the users database to update a flag to value 1 when they move to a record and back to 0 when they leave it

Your update routine could then exclude everything that has the flag set

Just a suggestion ???
Jan 18 '08 #2
Megalog
378 Recognized Expert Contributor
Maybe you could arrange the users database to update a flag to value 1 when they move to a record and back to 0 when they leave it

Your update routine could then exclude everything that has the flag set

Just a suggestion ???
I had considered that.. but our form is set up to save a copy of the current record to a history table whenever a user makes a change and saves the record. If I implement that flag, then everytime a user simply cycles through the records they would be creating a history trail.

This is a split db btw.
Jan 18 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3236
by: Andie | last post by:
Hello All, How would I go about using a disconnect recordset and select (x) records from it, x being the number of records to be selected. Many thanks in advance. -- Andie
15
7966
by: U N Me | last post by:
I have a continuous form that lists records from a query. One of the columns is an amount field, In the footer of the form I place a text box that displays the total (sum) of the amount. The data in the form is linked from a one-to-many table relationship. In this instance, I really can't sum the value from the one's table since if there were 3 records in the many table for a record id, the value would be summed 3 times. IOW, I may be...
5
29834
by: Simone | last post by:
Hello I hope you guys can help me. I am very new to ADO... I am creating a ADODB connection in a module and trying to access it from a command button in a form. Function fxEIDAssgn(plngEID As Long) As Boolean Dim rsAssignedUser As ADODB.Recordset Dim strSelectUser As String
22
2864
by: Gerry Abbott | last post by:
Hi all, I having some confusing effects with recordsets in a recent project. I created several recordsets, each set with the same number of records, and related with an index value. I create a table and add the index value and a value/s from each recordset in turn, into a temporary table, which I used to create a report. I created this with DAO objects, and it worked fine. I use iteration, and the ..movenext command to get the next...
2
7762
by: Sunil Korah | last post by:
I am having some trouble with opening recordsets. I have used code more or less straight from the access help. But still I am getting some errors. I am unable to work out what exactly I am doing wrong. 1.When I try the following code it gives the error message "compile error- type mismatch" on the last line. ( I have seen in past postings that this error is usually because of DAO/ADO mismatch. Is the recordsource for forms in Access 2000...
13
3465
by: Jan | last post by:
Hi I have a database that I use to keep track of the sales promotions that we send to companies. I normally send a mailing based on a subset of the companies in the database (found using the query: QryICTMassDistribution3) , I then use a form and the code below to create a new record in the corrispondence table to show what corrispondence has been sent to various companies.
3
441
by: ruomingxu | last post by:
I have a problem with recordset/SQL statement. The following is the code. Private Sub Command1_Click() Dim SqlQuery As String Dim RcdSet As Recordset Dim cnt As Integer SqlQuery = "SELECT * FROM temp_test;" Set RcdSet = CurrentDb.OpenRecordset(SqlQuery) cnt = RcdSet.RecordCount
10
9212
by: shubha.sunkada | last post by:
Hi, I have a recordset connection in asp that I am using to search records.If I use the client side cursorlocation (rs.cursorlocation=3) then it takes really long to return back the records due to which a timeout occurs.If I change the cursorlocation to adUseNone(1) or adUseServer(2) then the search is faster and without any problems.But the sort on records cannot be done if I use adUseClient(3).I need to have sort on these records.
2
2360
by: phill86 | last post by:
Hi, i have a recordset that updates a table which works fine when you add, update and paste a single record but if you try and paste multiple records it will only update the table with the prevoius records and it will ignore the new pasted records i am running the following code on the afterupdate event in the form Please Help Dim dbsCurrent As Database Dim dbsLinkedData As Database
0
8785
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8560
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7389
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5671
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4200
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1778
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.