In answer to your second question, I keep a standard routine which checks the 
state of the dataset in OnCloseQuery.  If state is not dsbrowse (say, dsInsert 
or dsEdit) the user is prompted to save changes.  Others may well have 
different/better ways of achieving the same.

regards
Steve

 -----Original Message-----
From:   [email protected] [mailto:[EMAIL PROTECTED]  On Behalf Of 
no_draws_player
Sent:   28 August 2006 06:40
To:     [email protected]
Subject:        [delphi-en] Save onclose form

Dear All 

I'm using SDAC 3.50 on Delphi 7.1. I have 2 forms for cutomers: 


1-      The first form is for displaying in a dbgrid Some details of 
the 
customers. The form contains a Dbgrid, a datasource, a Tmsquerry and 
3 
buttons (New, Edit and delete). (the querry is in browse mode only - 
No Editing) 
2-      The second form is for Editing, Posting new records and 
deleting 
With one other querry. 

The database is MSsql server 2000.

My first problem is how to send the current record to the second 
form 
for editing or deleting. 


My second problem is that When the user has do some changes without 
posting (New record or when editing) and wants to close the second 
form, I Want to ask him before closing the form if he wants to save 
the 
changes or not. The property (Changecount used in dbexpress don't 
exist 
in Sdac). 


Thanks a lot for your help.










-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links



 



***************************************************************************
This e-mail and any files transmitted with it are confidential. If you are not 
the intended recipient, any reading, printing, storage, disclosure, copying or 
any other action taken in respect of this e-mail is prohibited and may be 
unlawful. If you are not the intended recipient, please notify the sender 
immediately by using the reply function and then permanently delete what you 
have received.
Content of emails received by this Trust will be subject to disclosure under 
the Freedom of Information Act 2000, subject to the specified exemptions, 
including the Data Protection Act 1998 and Caldicott Guardian principles.
This footnote also confirms that this email message has been swept by 
MIMESweeper and Sophos Anti-virus for the presence of computer viruses.
***************************************************************************



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to