EDBEngineError Exception 
Author Message
 EDBEngineError Exception

hi all,

i have a problem with the this Exception...

I have a table which can be accessed at the same time in two different
windows (to see two different records).

My probelm is that i want to intercept this exception, to prevent from
modifying the same record if it is loaded in the two different windows.

But, although there are a lot of examples of how to type the source code to
intercept it, i don't know where to put those examples.

The problem occurs when both TTables in the two windows change into dsEdit
state. i have this exception and i don't know where to put the
try..except..end;

any help much appreciated !

guillaume



Tue, 03 Mar 1998 03:00:00 GMT  
 EDBEngineError Exception

Quote:

>hi all,

>i have a problem with the this Exception...

>I have a table which can be accessed at the same time in two different
>windows (to see two different records).

>My probelm is that i want to intercept this exception, to prevent from
>modifying the same record if it is loaded in the two different windows.

>But, although there are a lot of examples of how to type the source code to
>intercept it, i don't know where to put those examples.

>The problem occurs when both TTables in the two windows change into dsEdit
>state. i have this exception and i don't know where to put the
>try..except..end;

>any help much appreciated !

>guillaume

If you are letting the user enter edit mode without a special button or anything
(i.e. they start typing in one of your fields), I'd use the BeforeEdit event
handler of the TTable and check the state of the table.  If it is in dsEdit, don't
allow it to go into edit mode, and maybe display a little message as to why.

If you are using an explicit call to edit to enter the edit state do something like
:

Try
     TTable.edit;
Except on EDatabaseerror      {or whatever exception you want}
     {show error, prevent edit...}

This is just the way I've done it, and I am by no means an expert at this stuff
(Yet ;) ).  YMMV

Hope this helps...

Erik Reikes



Fri, 06 Mar 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Closing a form after an EDBEngineError exception is handled

2. Help Working with EDBEngineError exception

3. How to trap EDBEngineError-exceptions?

4. What means: 'At End of Table' (EDBEngineError exception).

5. DBLookupComboBox: EDBEngineError 'No Current record'

6. EDBEngineError: Master record missing

7. EdbEngineError - Record/Key deleted

8. EDBEngineError

9. EDBEngineError

10. EDBEngineError - Directory is busy

11. EDBEngineError. Where can I get the categories/errorcodes

12. EDBEngineError "Record lock failed message"

 

 
Powered by phpBB® Forum Software