473,405 Members | 2,444 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,405 software developers and data experts.

Access 97 bogus duplicate records

I have been working with an A97 database that performs a data processing
function. It imports data from a flat text file then uses a dao transaction
that executes a number of sql statements (about 30 in all) to append to
various tables, delete records, copy from table A to table B etc, ultimately
downloading to a series of text files that contain 'processed data'.

The issue is that on the odd occasion (this process is executed every
business day and this issue occurs roughly once every 2 to 3 months) the
process goes totally haywire and some of the tables end up with thousands
and thousands of duplicate records. Like today a table that should have had
a couple of thousand records ended up with over 800,000 records!!! When
this was de-duped we were back to a couple of thousand. This doesnt appear
to be an issue with the code. Firstly I have checked it and secondly this
only happens on the odd occasion. It is as if for some reason Access
repeats the same INSERT.. statement over and over and over again even though
there are no loops in the code that is being executed. Possibly this is to
do with recursive queries but even this doesnt seem to be the case based on
the logic the application uses.

Has anyone out there come across this issue or know of what could be causing
this?

Nov 13 '05 #1
4 1929
Hi Andrew.

Never seen anything like that, but there are a few things that might be
worth checking out.

The first thing that comes to mind is to check the error handling. Is there
any conceivable way that an error could be occurring WITHOUT a rollback? If
so, this leaves an uncommitted level of transaction. If the process were
then repeated (or continued/picked up by another routine), it might be
possible to end up with a situation where the original uncommitted
transaction that you thought was abandoned is actually being committed, and
so the effect appears to be that the process has been duplicated.

Presumably you are using dbFailOnError with all executes. There are some
weird things that happen if you don't. (For example, if you execute a
mal-formed append query statement without dbFailOnError, Access will report
zero RecordsAffected, even though records were appended.)

Because these rare/intermittent things can be very hard to trace, it may be
worth adding some logging to the procedures, logging the beginning of each
transaction, each SQL string being executed, the RecordsAffected for each
one, and the end result (CommitTrans or Rollback). The log could be
invaluable once it goes bad again. (Naturally you will need to ensure that
the logging is outside all transaction levels.)

There are other possible issues that might be worth considering. For
example, there can be strange side-effects from closing the default
workspace, or from using CurrentDb instead of ws(0).

HTH

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Andrew Chanter" <he****@radsolutions.com.au> wrote in message
news:ds******************@news-server.bigpond.net.au...
I have been working with an A97 database that performs a data processing
function. It imports data from a flat text file then uses a dao
transaction that executes a number of sql statements (about 30 in all) to
append to various tables, delete records, copy from table A to table B etc,
ultimately downloading to a series of text files that contain 'processed
data'.

The issue is that on the odd occasion (this process is executed every
business day and this issue occurs roughly once every 2 to 3 months) the
process goes totally haywire and some of the tables end up with thousands
and thousands of duplicate records. Like today a table that should have
had a couple of thousand records ended up with over 800,000 records!!!
When this was de-duped we were back to a couple of thousand. This doesnt
appear to be an issue with the code. Firstly I have checked it and
secondly this only happens on the odd occasion. It is as if for some
reason Access repeats the same INSERT.. statement over and over and over
again even though there are no loops in the code that is being executed.
Possibly this is to do with recursive queries but even this doesnt seem to
be the case based on the logic the application uses.

Has anyone out there come across this issue or know of what could be
causing this?

Nov 13 '05 #2
Hi Andrew.

Never seen anything like that, but there are a few things that might be
worth checking out.

The first thing that comes to mind is to check the error handling. Is there
any conceivable way that an error could be occurring WITHOUT a rollback? If
so, this leaves an uncommitted level of transaction. If the process were
then repeated (or continued/picked up by another routine), it might be
possible to end up with a situation where the original uncommitted
transaction that you thought was abandoned is actually being committed, and
so the effect appears to be that the process has been duplicated.

Presumably you are using dbFailOnError with all executes. There are some
weird things that happen if you don't. (For example, if you execute a
mal-formed append query statement without dbFailOnError, Access will report
zero RecordsAffected, even though records were appended.)

Because these rare/intermittent things can be very hard to trace, it may be
worth adding some logging to the procedures, logging the beginning of each
transaction, each SQL string being executed, the RecordsAffected for each
one, and the end result (CommitTrans or Rollback). The log could be
invaluable once it goes bad again. (Naturally you will need to ensure that
the logging is outside all transaction levels.)

There are other possible issues that might be worth considering. For
example, there can be strange side-effects from closing the default
workspace, or from using CurrentDb instead of ws(0).

HTH

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Andrew Chanter" <he****@radsolutions.com.au> wrote in message
news:ds******************@news-server.bigpond.net.au...
I have been working with an A97 database that performs a data processing
function. It imports data from a flat text file then uses a dao
transaction that executes a number of sql statements (about 30 in all) to
append to various tables, delete records, copy from table A to table B etc,
ultimately downloading to a series of text files that contain 'processed
data'.

The issue is that on the odd occasion (this process is executed every
business day and this issue occurs roughly once every 2 to 3 months) the
process goes totally haywire and some of the tables end up with thousands
and thousands of duplicate records. Like today a table that should have
had a couple of thousand records ended up with over 800,000 records!!!
When this was de-duped we were back to a couple of thousand. This doesnt
appear to be an issue with the code. Firstly I have checked it and
secondly this only happens on the odd occasion. It is as if for some
reason Access repeats the same INSERT.. statement over and over and over
again even though there are no loops in the code that is being executed.
Possibly this is to do with recursive queries but even this doesnt seem to
be the case based on the logic the application uses.

Has anyone out there come across this issue or know of what could be
causing this?

Nov 13 '05 #3
On Wed, 03 Aug 2005 12:07:37 GMT, "Andrew Chanter"
<he****@radsolutions.com.au> wrote:

A well-placed unique index would make this impossible.
-Tom.

I have been working with an A97 database that performs a data processing
function. It imports data from a flat text file then uses a dao transaction
that executes a number of sql statements (about 30 in all) to append to
various tables, delete records, copy from table A to table B etc, ultimately
downloading to a series of text files that contain 'processed data'.

The issue is that on the odd occasion (this process is executed every
business day and this issue occurs roughly once every 2 to 3 months) the
process goes totally haywire and some of the tables end up with thousands
and thousands of duplicate records. Like today a table that should have had
a couple of thousand records ended up with over 800,000 records!!! When
this was de-duped we were back to a couple of thousand. This doesnt appear
to be an issue with the code. Firstly I have checked it and secondly this
only happens on the odd occasion. It is as if for some reason Access
repeats the same INSERT.. statement over and over and over again even though
there are no loops in the code that is being executed. Possibly this is to
do with recursive queries but even this doesnt seem to be the case based on
the logic the application uses.

Has anyone out there come across this issue or know of what could be causing
this?


Nov 13 '05 #4
On Wed, 03 Aug 2005 12:07:37 GMT, "Andrew Chanter"
<he****@radsolutions.com.au> wrote:

A well-placed unique index would make this impossible.
-Tom.

I have been working with an A97 database that performs a data processing
function. It imports data from a flat text file then uses a dao transaction
that executes a number of sql statements (about 30 in all) to append to
various tables, delete records, copy from table A to table B etc, ultimately
downloading to a series of text files that contain 'processed data'.

The issue is that on the odd occasion (this process is executed every
business day and this issue occurs roughly once every 2 to 3 months) the
process goes totally haywire and some of the tables end up with thousands
and thousands of duplicate records. Like today a table that should have had
a couple of thousand records ended up with over 800,000 records!!! When
this was de-duped we were back to a couple of thousand. This doesnt appear
to be an issue with the code. Firstly I have checked it and secondly this
only happens on the odd occasion. It is as if for some reason Access
repeats the same INSERT.. statement over and over and over again even though
there are no loops in the code that is being executed. Possibly this is to
do with recursive queries but even this doesnt seem to be the case based on
the logic the application uses.

Has anyone out there come across this issue or know of what could be causing
this?


Nov 13 '05 #5

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

Similar topics

0
by: Frances | last post by:
Hi All, I'm having a problem trying to add a record to a simple Access 2000 db (db is very similar to an address book but with more info than the usual address, phone, etc.). The database is...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
0
by: Andrew Chanter | last post by:
I have been working with an A97 database that performs a data processing function. It imports data from a flat text file then uses a dao transaction that executes a number of sql statements (about...
46
by: Adam Turner via AccessMonster.com | last post by:
If I had a field called "Name" in an Access table "Contact Info", and the field contained VBScript... Function Main(rstFields) Main = rstFields.Item("FirstName").Value End Function 1. How do...
24
by: cassetti | last post by:
Here's the issue: I have roughly 20 MS excel spreadsheets, each row contains a record. These records were hand entered by people in call centers. The problem is, there can and are duplicate...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
16
by: RichardP | last post by:
Hi there everyone - I'm new to this forum. I am having an issue when running an application from an instance of Access which has been started through automation (early or late bound, makes no...
5
by: Kip | last post by:
I have an office with approx 8 people. I have used Access with a Form on my personal PC for client records. I was wondering if I could put the Access table on a server and put shortcuts on each...
6
by: ashes | last post by:
Hi, I am creating an ecommerce website using Microsoft Visual Studio, VB.Net and MS Access 2003. I am new to VB.Net When someone wants to register on the website, they fill out a form and the...
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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.