BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Not in edit mode error

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop)
View previous topic :: View next topic  
Author Message
Richard Beilby
Guest





PostPosted: Sat Dec 03, 2005 10:09 pm    Post subject: Not in edit mode error Reply with quote



When closing a table I am getting an "not in edit mode" error, even
though there is no changed data to save. All data has been saved, the
table status is dsBrowse, but, when the table is closed the error occurs
every time. The table is the detail table in a master/detail
relationship and has "onchange" events coded. It is these that are being
triggered by the close process. Has anyone got any ideas why this should
be happening and advise how I can get round the problem. I am using D5.

--

Regards,

Richard Beilby.
Back to top
Mike Shkolnik
Guest





PostPosted: Sat Dec 03, 2005 10:14 pm    Post subject: Re: Not in edit mode error Reply with quote



I sure that in some event (for dataset or for your form) you change the
value for field

--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com

"Richard Beilby" <R.Beilby (AT) NoSpam (DOT) co.uk> wrote

Quote:
When closing a table I am getting an "not in edit mode" error, even
though there is no changed data to save. All data has been saved, the
table status is dsBrowse, but, when the table is closed the error occurs
every time. The table is the detail table in a master/detail
relationship and has "onchange" events coded. It is these that are being
triggered by the close process. Has anyone got any ideas why this should
be happening and advise how I can get round the problem. I am using D5.

--

Regards,

Richard Beilby.



Back to top
Richard Beilby
Guest





PostPosted: Sun Dec 04, 2005 7:51 pm    Post subject: Re: Not in edit mode error Reply with quote




Mike,

I have traced through in debug (took a long time) and couldn't find
anything where a change could take place. At the time the close
procedure is called the table's status is dsBrowse. A couple of TDBEdit
objects have the onchange events coded to total the value of items on an
invoice and then to save the totals in the master table. It is the
detail that throws up the error after the close has taken place and to
my knowledge the data has not changed and certainly not by my code.
Could the problem be that the event is triggered by an apparent change
to the TDBEdit object, although there has not been a change to the data
in the Table's corresponding field.

Is it possible to test if the table's field has been modified or if the
table itself has been change?

To get round the problem I have put a test for the state in the event's
procedure to prevent the summation of the values and the changing of any
data in the table's fields. I would like to know what the cause is just
in case it could cause data corruption.


--

Regards,

Richard Beilby.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.