473,786 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Copying new records

Hi

I need to copy new records from an access table which can potentially have
records added to it all the time by users. I figure I can add a flag for
records that have been copied already that can be set after copy. The
problem is that in the time that I copy all new records using 'select * from
... where not flag' and coming back to update flags for all records not
already flagged, new records could have been entered by the users which may
also get flagged as copied with 'update ... set flag=true where not flag'.
How can I differentiate between the records that are copied and still not
flagged and the records that are new and have not been copied.

Thanks

Regards
Nov 13 '05 #1
1 1146
You should be able to BeginTrans, then copy your records and set the flag
before CommitTrans.

You may find that this approach blocks other records from being added during
your copy operation, but it should avoid the problem where new records are
added and wrongly flagged.

If you want an example of how to work with transactions, see:
http://allenbrowne.com/ser-37.html

--
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.

"John" <jo**@nospam.in fovis.co.uk> wrote in message
news:40******** *************@n ews-text.dial.pipex .com...

I need to copy new records from an access table which can potentially have
records added to it all the time by users. I figure I can add a flag for
records that have been copied already that can be set after copy. The
problem is that in the time that I copy all new records using 'select * from .. where not flag' and coming back to update flags for all records not
already flagged, new records could have been entered by the users which may also get flagged as copied with 'update ... set flag=true where not flag'.
How can I differentiate between the records that are copied and still not
flagged and the records that are new and have not been copied.

Nov 13 '05 #2

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

Similar topics

3
2669
by: Jason | last post by:
In enterprise manager I am copying a table from one database to another. I am using the dts wizard to import the data. After I successfully import the data, I open both tables to compare the records to make sure they are the same. I right click on a field and click "last" for both tables. However, the record is different for both. If I do a query the record is still there but they do not show up in the same order. Why does'nt the...
1
1400
by: Jimbo | last post by:
Hi Guys, I'm hoping one of you will give me a leg up with a problem Im having, which I think is possible to do. Let me explain. I have 2 tables and 1 form - ie 'tableDigit', 'tableNumber' and 'formDigit'. 'tableDigit' has 2 fields - ie 'digit1' and 'digit2', 'formDigit' is used to input data to 'tableDigit'. 'tableNumber' has 1 field - ie 'Number'
5
2467
by: Nathan Sokalski | last post by:
I am writing an ASP.NET application in which I need to copy DataRows from one DataTable to another. When I use code such as the following: temprows = nodes.Select("state='PA'") temptable.Clear() For Each row As DataRow In temprows temptable.Rows.Add(row) Next
8
3361
by: daD | last post by:
I'm trying to write a small database that tracks people coming and going from a small campground. I need to have the current guests in the "current" table" and then have the ability to check them out to the "archive" table when they leave, by pushing the "check-out" button. I see the steps as follows: 1. When the check-out button is pressed, the computer should automatically add the current date into the "date checked-out" field. ...
38
1815
by: Rex | last post by:
In a table, I have number of records belonging to a particular ID now if I enter a value in one of the fileds of this table I want it to be copied in all the records belonging to this particluar ID. for example ID Name -------------------------- 1 xyz 1 1 1
1
1326
by: francesllee | last post by:
I'm having problems copying subreports when copying a report. Is there an easy way to do this? My childlink is not a AutoNumber but it is a number (which should make is simpler). I just want to set the childlink to a 0. The keys are the primary keys. Parent: tTransmittal: TX, Operation, OperationDate, Address, Key1 Child: tData: TX, Data, Classification, Link, Key2 GrandChild?: Link, Description, Media, LogNumber, Key3 Thank you...
1
1022
by: cmrhema | last post by:
Hi, I have two tables emp and empcheck1 in the same database emp consits 50 records and empcheck1 consists of 25 records Both the tables have the same design, here empid is the unique key I want to insert all the datas from emp1 to empcheck1 in such a way that it should not rewrite or duplicate the original 25 records
2
2392
by: troy_lee | last post by:
What is the best way of copying all the records from a linked table into a replica table that is local on my computer? This is for development work at home where I can not access the main table. Is a macro the best way to handle this? Thanks in advance. Troy Lee
0
1283
by: ElishaThompson | last post by:
I recently had a problem requiring me to locate and copy all records pertaining to a particular client from numerous tables in a database on a given server to tables within an identical database on another server. In essence; Given a particular ClientID (primary key in a top-of-the-hierarchy table), I needed to be able to obtain all records in all tables (maintaining referential integrity) that pertain to the particular ClientID and copy...
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10108
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
9960
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
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
6744
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
5397
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
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
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.