473,947 Members | 1,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A2K - how to detect any change to a database to avoid unnecessary code execution

Hi,

I have created a new form that reads in data from some intermediate tables.
These intermediate tables are used to compile data for use in a report or
the new form I have made.

Having opened the new form with this intermediate data (it provides an
aggregate view of various top-level codes in column A) the user can view and
add projections.

The user can close the form and then make changes in the database. At this
point I know if the form is reopened then my code will repopulate column A
with the updated figures.

Is there a way of determining if the data has changed before I run that
code? That way I can avoid running the repopulation code. And if it's
changed I can display a message to the user. I can think of a number of
clunky ways of doing it but would like alternate opinions. Obviously I'm
looking for a general sort of solution as I have quite a few tables that
could be changed. I wish there was some sort of built-in global flag that
could track this sort of thing, would make it alot easier.

thanks
Martin
Jan 4 '06 #1
2 1748
Red
You could always mek your own little Global Boolean flag :D

For example
(in some module)
Public MyTableHasChang ed as Boolean = False

Then, when ever you update the master table(s) (however you may do
that), you can set the flag to true.... then, when the intermediate
tables are updated, then set it back to false.... just an idea though
:D

~Red

Jan 4 '06 #2
Red wrote:
You could always mek your own little Global Boolean flag :D

For example
(in some module)
Public MyTableHasChang ed as Boolean = False

Then, when ever you update the master table(s) (however you may do
that), you can set the flag to true.... then, when the intermediate
tables are updated, then set it back to false.... just an idea though
D


~Red


Thanks, not a bad idea. I have to identify all the possible places the data
change could happen but that could work.
Jan 5 '06 #3

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

Similar topics

4
3872
by: Jim in Arizona | last post by:
I'm wanting to do a simple controlled voting page. I too our webserver off anonymous and everyone who accesses the website is a domain authenticated user. I've already done some control structure pages based on Request.ServerVariables("AUTH_USER"), which works great. That's also how I would do this page, in my basic thinking. My idea is to have an access database with two tables. One table will have the vote written to it and the other...
4
2650
by: Richard Cornford | last post by:
For the last couple of months I have been trying to get the next round of updates to the FAQ underway and been being thwarted by a heavy workload (the project I am working on has to be finished an QA tested for a new year release. I don't think that going to prove practical, but there is no harm in trying :) and some serious family commitments. But it has to be done soon so this is stage one. Mike Winter provided an extensive list of...
10
23314
by: Noozer | last post by:
Is it possible to detect where on a page the click occurred when the OnClick event of the BODY tag is fired? Thx
7
2720
by: Danny J. Lesandrini | last post by:
I know this has been discussed before, as I've seen the Google posts, but they all leave me with an unanswered question: Does my DAO code executed in the front end cause the back end to bloat? (May also substitute UPDATE and/or DELETE queries for DAO code.) I was just brought on to a project with Access 97 where the all data is kept on the server. It doubles in size each day, from 80 mb to 160 mb. The data file contains only tables...
6
2675
by: joebob | last post by:
I've got two forms, Form1 and Form2. Form1 opens invisibly when the database opens. From Form1 (or from a regular module or class module accessed by Form1), is there a way to detect when Form2 opens? I'm restricted to only coding in Form1 (or a regular module or class module accessed by Form1). The code can't be in another Form's module, and can't be in the application's startup module fired by the AutoExec macro. That's already being...
5
2482
by: Charlie King | last post by:
in brief: Can I perform operations like imagesx() or getimagesize() on raw image data as retrieved into a variable from a database, without first saving it as a file? If so, how? If not, what is the best way to create a temporary file such that it is unlikely to conflict with other sessions that are performing the same actions? in more detail: I have a database that stores an image in a BLOB field, and I want to display that image on...
2
7726
by: Brian Tkatch | last post by:
How do i detect a datagrid row change? Currently, i have a few datagrids that i keep in sync, refreshing from the database whenver a row changes. I would like to avoid CurrentCellChanged because changing a cell within the same row causes an uneccesary DB call. Also, when the row changed to is the "new" row, nothing should happen. I wrote some code, which indeed works, but would like to know if i am missing something more obvious.
10
5869
by: Xu, Qian | last post by:
Hi All, Is it possible to detect whether a (confirmation or prompt) dialog is present? And furthermore, how to press OK, Cancel buttons of a dialog? I am writing a javascript based test framework. I would like to detect and close dialog using javascript. Thanks in advance --
36
5438
by: Don | last post by:
I wrote an app that alerts a user who attempts to open a file that the file is currently in use. It works fine except when the file is opened by Notepad. If a text file is opened, most computers are configured to use Notepad to open the file by default and if they are configured to use Notepad by default I want it to remain that way rather than retrieve the text into my app or force the user to use another app to read the file. I'm...
0
9983
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11577
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11348
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
7431
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
6117
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
6332
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4947
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
4539
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3543
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.