473,383 Members | 1,837 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,383 software developers and data experts.

Dataset State

I want to prevent the user from closing the application if they are in
the middle of entering data. Is there a way to detect this?

Aug 14 '06 #1
7 3397
There are a couple of events you could try to catch.
The "FormClosing" event for starters..

MarkusR wrote:
I want to prevent the user from closing the application if they are in
the middle of entering data. Is there a way to detect this?
Aug 14 '06 #2
Thanks Bala but I know where to check but I don't know what to check.

How do I detect the state of the table?

-Markus

Bala wrote:
There are a couple of events you could try to catch.
The "FormClosing" event for starters..

MarkusR wrote:
I want to prevent the user from closing the application if they are in
the middle of entering data. Is there a way to detect this?
Aug 15 '06 #3
Is this a new concept?

Does no one validate whether the user wants to save/cancel changes when
the form is closing?

-MarkusR

MarkusR wrote:
Thanks Bala but I know where to check but I don't know what to check.

How do I detect the state of the table?

-Markus

Bala wrote:
There are a couple of events you could try to catch.
The "FormClosing" event for starters..

MarkusR wrote:
I want to prevent the user from closing the application if they are in
the middle of entering data. Is there a way to detect this?
Aug 21 '06 #4
Depends what your datasource is.
If it's a dataset you can call DataSet.GetChanges() to get any changes (e.g.
if there are no changes than the user hasn't modified any data).
This method obviously co-incides with the functionaliy of the
AcceptChanges() method of the dataset and row and table state (New,
Modified, Unchanged, Deleted etc).

HTH

Simon

"MarkusR" <ma*******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Is this a new concept?

Does no one validate whether the user wants to save/cancel changes when
the form is closing?

-MarkusR

MarkusR wrote:
Thanks Bala but I know where to check but I don't know what to check.

How do I detect the state of the table?

-Markus

Bala wrote:
There are a couple of events you could try to catch.
The "FormClosing" event for starters..
>
MarkusR wrote:
I want to prevent the user from closing the application if they are
in
the middle of entering data. Is there a way to detect this?

Aug 21 '06 #5
Thanks Simon,

I am used to delphi where it is very event driven. BeforePost,
AfterPost, BeforeInsert....
Dataset.State = dsEdit..., tabpage.changing (so you can prevent it)...

Got spoiled.

C# is great though, so no need to start a delphi vs c# war. Just give
me a chance to adjust.

-Markus_R

Simon Tamman wrote:
Depends what your datasource is.
If it's a dataset you can call DataSet.GetChanges() to get any changes (e.g.
if there are no changes than the user hasn't modified any data).
This method obviously co-incides with the functionaliy of the
AcceptChanges() method of the dataset and row and table state (New,
Modified, Unchanged, Deleted etc).

HTH

Simon

"MarkusR" <ma*******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Is this a new concept?

Does no one validate whether the user wants to save/cancel changes when
the form is closing?

-MarkusR

MarkusR wrote:
Thanks Bala but I know where to check but I don't know what to check.
>
How do I detect the state of the table?
>
-Markus
>
Bala wrote:
There are a couple of events you could try to catch.
The "FormClosing" event for starters..

MarkusR wrote:
I want to prevent the user from closing the application if they are
in
the middle of entering data. Is there a way to detect this?
Aug 22 '06 #6
No worries, no need to start a Delphi-C# war, Eric Gunnarson worked on
creating both C# and Delphi so it's almost like we're family. :)
"MarkusR" <ma*******@gmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
Thanks Simon,

I am used to delphi where it is very event driven. BeforePost,
AfterPost, BeforeInsert....
Dataset.State = dsEdit..., tabpage.changing (so you can prevent it)...

Got spoiled.

C# is great though, so no need to start a delphi vs c# war. Just give
me a chance to adjust.

-Markus_R

Simon Tamman wrote:
Depends what your datasource is.
If it's a dataset you can call DataSet.GetChanges() to get any changes
(e.g.
if there are no changes than the user hasn't modified any data).
This method obviously co-incides with the functionaliy of the
AcceptChanges() method of the dataset and row and table state (New,
Modified, Unchanged, Deleted etc).

HTH

Simon

"MarkusR" <ma*******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Is this a new concept?
>
Does no one validate whether the user wants to save/cancel changes
when
the form is closing?
>
-MarkusR
>
MarkusR wrote:
Thanks Bala but I know where to check but I don't know what to
check.

How do I detect the state of the table?

-Markus

Bala wrote:
There are a couple of events you could try to catch.
The "FormClosing" event for starters..
>
MarkusR wrote:
I want to prevent the user from closing the application if they
are
in
the middle of entering data. Is there a way to detect this?
>

Aug 22 '06 #7
I miss my numbered bookmarks as in Delphi. :(

Simon Tamman wrote:
No worries, no need to start a Delphi-C# war, Eric Gunnarson worked on
creating both C# and Delphi so it's almost like we're family. :)
"MarkusR" <ma*******@gmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
Thanks Simon,

I am used to delphi where it is very event driven. BeforePost,
AfterPost, BeforeInsert....
Dataset.State = dsEdit..., tabpage.changing (so you can prevent it)...

Got spoiled.

C# is great though, so no need to start a delphi vs c# war. Just give
me a chance to adjust.

-Markus_R

Simon Tamman wrote:
Depends what your datasource is.
If it's a dataset you can call DataSet.GetChanges() to get any changes
(e.g.
if there are no changes than the user hasn't modified any data).
This method obviously co-incides with the functionaliy of the
AcceptChanges() method of the dataset and row and table state (New,
Modified, Unchanged, Deleted etc).
>
HTH
>
Simon
>
"MarkusR" <ma*******@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Is this a new concept?

Does no one validate whether the user wants to save/cancel changes
when
the form is closing?

-MarkusR

MarkusR wrote:
Thanks Bala but I know where to check but I don't know what to
check.
>
How do I detect the state of the table?
>
-Markus
>
Bala wrote:
There are a couple of events you could try to catch.
The "FormClosing" event for starters..

MarkusR wrote:
I want to prevent the user from closing the application if they
are
in
the middle of entering data. Is there a way to detect this?
Aug 31 '06 #8

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

Similar topics

1
by: David D. McCrory | last post by:
I have the following that returns an array of a struct and I want to load it into a DataSet on the consumer side.....Can someone provide me with an example of how to use the DataSet.ReadXml()...
6
by: Lester Moreno | last post by:
Hello all, Up to now C# have been an great experience but I found myself in a end of the road problem. Let say that you have two windows program running on a local network area. User1 and...
4
by: Filippo Pandiani | last post by:
I have a grid that shows the file list from a folder. On the postback, how do I get a Dataset from this grid? Thanks, Filippo.
5
by: Grant | last post by:
Hello, How come when I add a new row to my dataset table it shows up as changed (agencyData.Haschanges() = True) but when I delete a row the dataset thinks here are no...
4
by: microsoft.news.com | last post by:
how can I get the values from my dataset to populate a form? I have the dataset in XML and I want to read it and get the data values out of it to populate my form. I want to show them all and not...
6
by: Vik | last post by:
A dataset is saved in session state. Then the dataset is filled out with the new records using a dataadapter. It appears then that the dataset saved in session state contains the new records even...
2
by: Stanav | last post by:
Hello all, I'm developing a web application using VB.Net 2003 and Framework 1.1. This application queries an AS/400 database. I'm using the IBM OleDb provider that came with IBM Client Access for...
3
by: Stanav | last post by:
Hello all, I'm developing a web application using VB.Net 2003 and Framework 1.1. This application queries an AS/400 database. I'm using the IBM OleDb provider that came with IBM Client Access for...
9
by: Tony Girgenti | last post by:
Hello I developed and tested a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1. It uses a web form. I tried doing this without any help, but i'm...
12
by: Brian | last post by:
I want to create an In Memory dataset. not connected to any database.. but putting my own info in from code or a file.... What are the steps to do this? Where can I find some info on how to do...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.