473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Timestamps causing write conflicts

I have an Access XP ADE application connected to a SQL Server 7.0 SP4
database. I have created a timestamp column in the main table.
Unfortunately, I am now getting persistent write conflict errors.

The order of operations are:
1. The application starts and loads the recordset into the form using a
stored procedure.
2. I modify a field and press a save button which uses me.dirty=false to
force a save.
3. The field is saved to the database. Using profiler I can observe the
modified field being saved. As I would expect, the update statement is
using the primary key and the timestamp column value. For the sake of this
discussion let's assume the value of the timestamp is 5ad9.
4. Without navigating off the record, I alter the same field (or a
different field) and press save again and a write conflict will appear.
Using profiler I can see the update statement that is attempting to update
the record. The update statement is using the previous value (5ad9) of the
timestamp column.

I thought that the timestamp column value is incremented each time the
record is updated. The ADE application does not appear to be recognizing
the new timestamp value.

Any help or advice you could give would be appreciated.

Thanks
George
Jul 20 '05 #1
3 3715
Actually, ADPs/ADEs in Access 2000 have some really serious bugs with TIMESTAMP
columns, and I ended up having to stop using them in my ADP apps. I recommend
that you do the same. Yes, I know all the good reasons you should use
TIMESTAMPS, and I agree with them. Still, you will fail to make an Access 2002
ADP app of any complexity work properly with TIMESTAMP columns in your tables.
Give up now, and save yourself a lot of headaches.

On Tue, 8 Jul 2003 09:13:27 -0500, "gwaddell" <no****@you.know> wrote:
I have an Access XP ADE application connected to a SQL Server 7.0 SP4
database. I have created a timestamp column in the main table.
Unfortunately, I am now getting persistent write conflict errors.

The order of operations are:
1. The application starts and loads the recordset into the form using a
stored procedure.
2. I modify a field and press a save button which uses me.dirty=false to
force a save.
3. The field is saved to the database. Using profiler I can observe the
modified field being saved. As I would expect, the update statement is
using the primary key and the timestamp column value. For the sake of this
discussion let's assume the value of the timestamp is 5ad9.
4. Without navigating off the record, I alter the same field (or a
different field) and press save again and a write conflict will appear.
Using profiler I can see the update statement that is attempting to update
the record. The update statement is using the previous value (5ad9) of the
timestamp column.

I thought that the timestamp column value is incremented each time the
record is updated. The ADE application does not appear to be recognizing
the new timestamp value.

Any help or advice you could give would be appreciated.

Thanks
George


Jul 20 '05 #2
Thanks for the information. MS Access is not my regular work area either
and have been lucky
in the past been able to avoid working in it. But my luck has run out.

I've got more experience using ADO in VB 6 and I can use this info there as
well.

"Erland Sommarskog" <so****@algonet.se> wrote in message
news:Xn**********************@127.0.0.1...
gwaddell (no****@you.know) writes:
I have an Access XP ADE application connected to a SQL Server 7.0 SP4
database. I have created a timestamp column in the main table.
Unfortunately, I am now getting persistent write conflict errors.

The order of operations are:
1. The application starts and loads the recordset into the form using a
stored procedure.
2. I modify a field and press a save button which uses me.dirty=false to force a save.
3. The field is saved to the database. Using profiler I can observe
the modified field being saved. As I would expect, the update statement
is using the primary key and the timestamp column value. For the sake
of this discussion let's assume the value of the timestamp is 5ad9.
4. Without navigating off the record, I alter the same field (or a
different field) and press save again and a write conflict will appear.
Using profiler I can see the update statement that is attempting to
update the record. The update statement is using the previous value
(5ad9) of the timestamp column.

I thought that the timestamp column value is incremented each time the
record is updated. The ADE application does not appear to be recognizing the new timestamp value.
But ADE cannot guess what the new value will be, since the timestamp

values are database wide. You must somehow get the new timestamp value back to
ADE when you have done your update.

This is not really my regular playing-ground, but I happened to read this
in a book on ADO Programming as late as today.

For this to work, you need:
. Set cursor-location to adUseClient.
. Set the dynamic property Update Resync to adResyncUpates. (This is a bit mask, so add it to the current value.)
. Set the dynamic property Update Criteria to adCriteriaTimeStamp.


--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp

Jul 20 '05 #3
Yes....I thought that the usual Microsoft help people were very quiet about
this issue.
"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:3h********************************@4ax.com...
Actually, ADPs/ADEs in Access 2000 have some really serious bugs with TIMESTAMP columns, and I ended up having to stop using them in my ADP apps. I recommend that you do the same. Yes, I know all the good reasons you should use
TIMESTAMPS, and I agree with them. Still, you will fail to make an Access 2002 ADP app of any complexity work properly with TIMESTAMP columns in your tables. Give up now, and save yourself a lot of headaches.

On Tue, 8 Jul 2003 09:13:27 -0500, "gwaddell" <no****@you.know> wrote:
I have an Access XP ADE application connected to a SQL Server 7.0 SP4
database. I have created a timestamp column in the main table.
Unfortunately, I am now getting persistent write conflict errors.

The order of operations are:
1. The application starts and loads the recordset into the form using a
stored procedure.
2. I modify a field and press a save button which uses me.dirty=false to
force a save.
3. The field is saved to the database. Using profiler I can observe the
modified field being saved. As I would expect, the update statement is
using the primary key and the timestamp column value. For the sake of thisdiscussion let's assume the value of the timestamp is 5ad9.
4. Without navigating off the record, I alter the same field (or a
different field) and press save again and a write conflict will appear.
Using profiler I can see the update statement that is attempting to updatethe record. The update statement is using the previous value (5ad9) of thetimestamp column.

I thought that the timestamp column value is incremented each time the
record is updated. The ADE application does not appear to be recognizing
the new timestamp value.

Any help or advice you could give would be appreciated.

Thanks
George

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: lkrubner | last post by:
This might be an idiot question, but how do you group by timestamps by date? I mean, given a large number of timestamps, spanning many months, how do grab them and say how many are from each day?...
5
by: Robert Schuldenfrei | last post by:
Dear NG, I have not heard from anyone about a good book that deals with the concurrency issue in SQL Server using C#. I have PROMISED Nick I would not use record locking and I have used an old...
2
by: Chumma Dede | last post by:
Hi, I need to code a DLL in .NET which logs the response times for our asp.net multi-tier application. The problem is we need to log the timestamps at multiple stages in a process lifecycle...
4
by: Craig G | last post by:
im not too sure how i should be storing the SQL2000 timestamps basically i return a dataset which is used to populate an editable grid. this dataset contains the timestamp. how should i be...
1
by: Erwin Van de Velde | last post by:
Hi, I'm building a central logging system for security applications as my master thesis, but I've run into some troubles: Different applications make database logs using different formats: -...
0
by: mikek | last post by:
Good Morning from Detroit, I am working on a project to Connect and manipulatee data in a SQLServer Data base, from a LINUX server using PERL. and SOAP We decided to use SOAP:Lite. (there are...
5
by: pnjones | last post by:
I am getting the write conflicit when 2 users access the same record the first one to save is allowed but the second user gets the message Write conflicit with the save option greyed out. I have...
3
by: loisk | last post by:
Hi, Does anybody know why I am getting the "Write Conflicts" error when I am opening my ACCESS database this morning even before making any changes at all?
6
by: xkenneth | last post by:
All, Just a quick question. I want to be able to have a data structure that organizes data (timestamps I'm working with) sequentially, so that i can easily retrieve the first x amount of...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.