DVL Software Limited
[ About | Services | Products | Search | Feedback | Support ]

PowerBuilder Tips

How to store your error messages

Back to the Tips


If you have an application which uses the PFC error message service (n_cst_error), you might have given some thought to distributing your application with the messages stored in a table.  At first, the error message table looked very attractive.  And it is, for most situations, especially those which access a central database.  However, if your application is deployed to many different locations and each location contains a database, the table approach can become a nightmare.

As with many technical problems, a alternative approach came to me right after implementing a valid solution.  At present, I'm storing this data within a database table which is immediately cached as soon as the application starts.  I'm going to change the approach so that the datawindow contains the data all the time via the Rows/Data method.

The specific problem I'm trying to solve is the updating of the messages table as used by the PFC error service.  At present, the options provided with PFC are limited to sourcing the messages from a file or from the database.  I want a third source: the datawindow, unretrieved.  I'm going to extend the error object via the PFE and add a third version of of_SetPredefinedSource.  When a new message is to be added to the list, I'll do it directly within the datawindow painter via Rows/Data.

If I was continue maintaining the data within the table, then I would need to distribute updates to that table when new messages were added.  Somehow these would be loaded into the database if they hadn't already been loaded.  I think the PFC extension approach leaves less room for error.  The application will always have the error messages associated with that version of the application.

Comments always welcomed.


Back to the Tips

[ About | Services | Products | Search | Feedback | Support ]

This page last updated: Wednesday, 23 February 2000
Copyright 1997, 1998, 1999, 2000 DVL Software Limited.  All rights reserved.