Re: Checking Tadoquery for changes
- From: Josh Fraser <jfraser@xxxxxxxxx>
- Date: Fri, 23 Sep 2005 08:37:46 -0400
Ok,
I think we are thinking about this on seperate paths here... Think of a word document, when you open MS Word and you get a blank screen its already in "Edit" Mode if you will. The same goes with my program, the user brings up the input form and its automatically in Insert. So checking the state of the query would be sort of redundant because it will always be in edit mode.
I know in vb there is like a 'haschanges" boolean on the query, but thats good ole ADO.Net and well I have to use vcl/win32 for this app.
The only thing I can think of is check the required fields to see if they are all null?
Josh
Vu Quang Thang wrote:
Is there anyway I can check a query for changes?
Reason being, I don't want to prompt the user to save the information on the form close if the data has not been modified or is blank.
Hi,
I think we can check the status of the ADODataset when close form. May be like this
FormCloseQuery(....)
begin
if ADODataset.State in [dsEdit,dsInsert] then
if MessageDlg('Save change?',mtConfirmation,[mbYes,mbNo],0) = mrYes then
ADODataset.Post
else
ADODataset.Cancel;
end;
Thang
.
- Follow-Ups:
- Re: Checking Tadoquery for changes
- From: Vitali Kalinin
- Re: Checking Tadoquery for changes
- References:
- Checking Tadoquery for changes
- From: Josh Fraser
- Re: Checking Tadoquery for changes
- From: Vu Quang Thang
- Checking Tadoquery for changes
- Prev by Date: Re: Kind of a newb question
- Next by Date: Re: Checking Tadoquery for changes
- Previous by thread: Re: Checking Tadoquery for changes
- Next by thread: Re: Checking Tadoquery for changes
- Index(es):
Relevant Pages
|