473,657 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Better way to check changed values

RP
In my Form, I have 20 or 30 Text Boxes and Combo Boxes. I am using a
tabbed interface. When the Form's Close button is clicked, I want to
check whether user attempted an entry in any of the Text Boxes or not.
If yes, a dialog box appears to ask whether user wants to Save the
entries or not.

There is also a data grid with one Code field that is a primary key.
Suppose, a user clicks on any row of the data grid, its column values
get filled in the above Text Boxes. If he changes any of the Text Box
values, then on Form Close when Save option is selected, the existing
record gets updated.

I don't want to use multiple flags and don't want multiple calls to
data-access layer. Any optimized way?
Jan 24 '08 #1
1 1845
Hi,
And what happens if he select one row, change it and then select another
row?

You have to keep track of the changes anyway, I think that with only one
flag you could do it. Both before closing and when changing the selected row
you should check for this flag.

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"RP" <rp*********@gm ail.comwrote in message
news:ee******** *************** ***********@f47 g2000hsd.google groups.com...
In my Form, I have 20 or 30 Text Boxes and Combo Boxes. I am using a
tabbed interface. When the Form's Close button is clicked, I want to
check whether user attempted an entry in any of the Text Boxes or not.
If yes, a dialog box appears to ask whether user wants to Save the
entries or not.

There is also a data grid with one Code field that is a primary key.
Suppose, a user clicks on any row of the data grid, its column values
get filled in the above Text Boxes. If he changes any of the Text Box
values, then on Form Close when Save option is selected, the existing
record gets updated.

I don't want to use multiple flags and don't want multiple calls to
data-access layer. Any optimized way?

Jan 24 '08 #2

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

Similar topics

14
2137
by: Dan | last post by:
I have seen differing ways to pass values to a class: $db=new mysqlclass('localhost','user','passwd','database'); ..... OR $db=new mysqlclass() $db->host='localhost'; $db->user='user'; $db->passwd='passwd';
0
1814
by: Francesc Guim Bernat | last post by:
Dear colleagues, i'm getting in troubles using one XML library with Visual Studio .NET and Xerces with Xalan. (Xercer 2.4 and Xalan 1.7) When i execute the code i get the next run time error: "Run-Time Check Failure #2 - Stack around the variable 'resolver' was corrupted." Looking on internet i've seen that the compiler, if you're running your
1
2737
by: Francesc Guim Bernat | last post by:
Dear colleagues, i'm getting in troubles using one XML library with Visual Studio .NET and Xerces with Xalan. When i execute the code i get the next run time error: "Run-Time Check Failure #2 - Stack around the variable 'resolver' was corrupted." Looking on internet i've seen that the compiler, if you're running your
9
1594
by: David | last post by:
I have a web app that is forms intensive. These forms have a number of dropdown lists, check box, etc., each which requires additional processing, db calls, etc. On an item changed, I post back the form and set a hidden field to tell PHP what changed so it knows what to process. Is there a preferred way to handle this type of forms processing? My screen is a mix of hidden vars., Javascript, etc. which works but it messy!
19
4091
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate the code that implements managing unbound controls on forms given the superior performance of unbound controls in a client/server environment. I can easily understand a newbie using bound controls or someone with a tight deadline. I guess I need...
0
3282
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS Remoting and possible others.
24
6827
by: Bob | last post by:
Hi there, I am working on an application to be used in our local Forensics department... Among other things the app will connect to a digital camera and download the images to the hard drive. For various reasons I need to be able to say with certainty that the image on the hard drive is exactly what was on the camera... any ideas on best way to achieve this...?
4
35886
by: Brett Romero | last post by:
Besides using a very long if statement and storing old text box values, is there a way to see if text box values have changed since an event? For example, say I have 8 textboxes when the form loads. They start empty. The user types values into 2 of them and clicks search. Before running the search, I want to make sure I don't waste cpu cycles because perhaps the user didn't change any values, which means I don't need to run the...
19
8283
by: Taras_96 | last post by:
Hi everyone, How do you detect that a form element has been changed? This thread: http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/9ae1c9d419264380/125a82c9be127790?lnk=st&q=checking+html+form++(updated+OR+edited+OR+changed)&rnum=28&hl=en#125a82c9be127790 suggests that you attach onChange event handlers to every form element, and when the handler fires you update a global 'isChanged' variable. This technique...
0
8397
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...
0
8827
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...
0
8605
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
7333
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...
1
6167
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
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
4158
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...
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1620
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.