Board index » delphi » Error messages not displaying when objects are saving
MaxMatt
![]() Delphi Developer |
Error messages not displaying when objects are saving2006-08-21 12:43:34 PM delphi123 Every now and then, a user will report to us that after working with our program the information they have enetered is not being saved to the database. During their session they will be able to see their changes but if they close the program and then re-open it they cannot see any of their changes. They report that they see no errors during there session. The program appears to be working as per usual. After some checking we have noticed that Bold is not raising exceptions when updating the DB. A reproducable example is as follows (I know this example is not the cause of the error the user is getting but it highlights the issue of exceptions not being visible outside of the IDE). 1. Run your Bold app 2. Load on object in your program. 3. Go to your DB and change the name of a column in the table of the object being displayed. 4. Edit and save the object. When saving the object you will notice that no exceptions are displayed to the user. If you try to reload the object in your program you will see an invalid column name exception appear (I would have expected to see this error when saving). You CAN see the exception "Invalid Column Name" generated during the save operation in the IDE but when the errors occurs on site you cannot run the IDE to see the cause. The code used to save the object is as follows BoldSystem.UpdateDatabase; if BoldSystem.BoldDirty then ShowMessage('Some objects were not saved to the database."); Even though the update failed the message is never shown because BoldSystem.BoldDirty has been set to false by the call to UpdateDatabase. Is there a way to get these exception to display outside of the IDE or does anyone know which and why these exception are being suppressed from the user? Thanks |