473,763 Members | 9,275 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Has Dataset Changed?

Hello,

I have a form where I want to only enable a save button when something has
changed in the dataset. Currently I'm checking current values against
original values everytime a value is changed to enable/disable the save
button. Is there a way of telling if a dataset has been changed (ds
property?) other than using this method?

Any help greatly appreciated!
Thanks in advance
Aug 21 '06 #1
5 3464
Mark,

If ds.HasChanges Then ...

Kerry Moorman
"Mark" wrote:
Hello,

I have a form where I want to only enable a save button when something has
changed in the dataset. Currently I'm checking current values against
original values everytime a value is changed to enable/disable the save
button. Is there a way of telling if a dataset has been changed (ds
property?) other than using this method?

Any help greatly appreciated!
Thanks in advance

Aug 21 '06 #2
Thanks Kerry!

"Kerry Moorman" wrote:
Mark,

If ds.HasChanges Then ...

Kerry Moorman
"Mark" wrote:
Hello,

I have a form where I want to only enable a save button when something has
changed in the dataset. Currently I'm checking current values against
original values everytime a value is changed to enable/disable the save
button. Is there a way of telling if a dataset has been changed (ds
property?) other than using this method?

Any help greatly appreciated!
Thanks in advance
Aug 21 '06 #3

Kerry Moorman wrote:
Mark,

If ds.HasChanges Then ...
I wonder if the DataSet class is "smart" enough to set this property
off if a changed value is changed back to the original value?
>
Kerry Moorman
"Mark" wrote:
Hello,

I have a form where I want to only enable a save button when something has
changed in the dataset. Currently I'm checking current values against
original values everytime a value is changed to enable/disable the save
button. Is there a way of telling if a dataset has been changed (ds
property?) other than using this method?

Any help greatly appreciated!
Thanks in advance
Aug 21 '06 #4
zacks,

No, I don't believe it is that smart.

Kerry Moorman
"za***@construc tion-imaging.com" wrote:
>

I wonder if the DataSet class is "smart" enough to set this property
off if a changed value is changed back to the original value?
Aug 21 '06 #5
Kerry,

What do you mean with set back, if you mean set back by hand to the original
values, than it will forever be a question if that was a change or not,
however if it is using the methods Reject changes or accept changes, than it
would do that. (Even it it has been a datarow that was changed)

I hope this gives an idea,

Cor

<za***@construc tion-imaging.comschr eef in bericht
news:11******** **************@ m73g2000cwd.goo glegroups.com.. .
>
Kerry Moorman wrote:
>Mark,

If ds.HasChanges Then ...

I wonder if the DataSet class is "smart" enough to set this property
off if a changed value is changed back to the original value?
>>
Kerry Moorman
"Mark" wrote:
Hello,

I have a form where I want to only enable a save button when something
has
changed in the dataset. Currently I'm checking current values against
original values everytime a value is changed to enable/disable the save
button. Is there a way of telling if a dataset has been changed (ds
property?) other than using this method?

Any help greatly appreciated!
Thanks in advance


Aug 21 '06 #6

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

Similar topics

2
4828
by: Alpha | last post by:
Hi, I have a window based program. One of the form has several textboxes and a datagrid. The textboxes are bind to the same dataset table as the datagrid and the text changes to reflect different row selected in the datagrid. I want to save the changes that user make in the textboxes when they select a different row in the datagrid. I tried capturing the textbox.text at datagrid's CurrentCellChanged event but by then the textbox.text...
14
2131
by: Lars Netzel | last post by:
A little background: I use three Datagrids that are in a child parent relation. I Use Negative Autoincrement on the the DataTables and that's workning nice. My problem is when I Update these grid and write to the database and I set the new Primary Keys and related Fields to the new asigned atuonumbers in the Access.
2
1125
by: Rich Wallace | last post by:
I know datasets have been beaten to death in here, I have what is hopefully a simple question about the integrity of a dataset when used in an application. Scenario: User A and User B are updating data in a SQL database via an application that utilizes a dataset, dataadapter and datagrid. User A retrieves data from data source and sits on the data for some time User B retrieves SAME data from source, changes data via teh datagrid and
12
2005
by: Graham Blandford | last post by:
Hi all, Would someone be able to tell me the most 'graceful' way of removing unwanted rows from a dataset based on a condition prior to update? OR, resetting the rows all to unchanged after they are initally added to the recordset. I create a dataset, which begins empty after the initial .Fill. Then I create several rows with some default information, leaving one
2
2820
by: Anthony Malt | last post by:
Hi, my server has a database table. I read this table on the server into a dataset and my client retrieves it through a webservice. No changes on the client and server happen. What's the best way to keep the data in sync? I want to avoid that I transfer the entire dataset all the time. Is there a way just to send/receive the changes?
4
2253
by: Al | last post by:
I have this scenario: 1. XML file with schema and data is created from SQL Server tables. XML file contains 6 tables, some of them have rows, some of them are empty. 2. XML file is given to the person with Pocket PC. 3. XML file is used to populate DataSet on the Pocket PC. 4. User adds new rows, changes values, deletes some rows. 5. Altered dataset is saved back to XML file. 6. XML file is given back to the person who initially created...
1
2539
by: matt | last post by:
hello, i have a web app that allows users to query our oracle db and produce a dataset of report data. they then have the option to serialize this data and store it in the database. later, then can re-run the report and get fresh data. now, they would like to be able to compare the fresh data to the stored data, getting a break-down of added/deleted/changed rows. on the surface, this sounded plausible -- by deserializing the stored
0
1112
by: kageyone | last post by:
I am having trouble updating a dataset representation of an xml file. The xml file is read into a dataset which is bound to a gridview control. The edit functionality was added to the code and handles the edit button fine. The data is changed on one of the fields in edit mode and captured in a variable when the update button is clicked. I attempt to assign the new value to the dataset's field in the edited datarow. I have seen examples of...
5
1861
by: Franck | last post by:
how come unchanged always true even if data changed This code come from my saving button: ============================================ DataSet ds1 = new DataSet(); DataSet ds2 = new DataSet(); DataSet ds3 = new DataSet(); //Static Dataset which contain values when my form load
0
9387
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
10148
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
9938
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,...
1
7368
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
6643
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
5270
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
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
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
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.