Re: Max number of Tables ?

From: Steven Whatley <swhatle_at_starbase.neosoft.com>
Date: 15 Mar 1995 16:09:20 GMT
Message-ID: <3k73fg$8js_at_uuneo.neosoft.com>


Stan Novinsky (stan_novinsky_at_jhuapl.edu) wrote:
: This sounds good, but can each message be a separate row if each
: message is composed of variable fields:
 

: ex: Message 1 is made up of the following
 

: Field 1 is INTEGER
: Field 2 is CHARACTERS
: Field 3 is REAL
: Field 4 is CHARCATERS
 

: Message 2 is made up of the following
 

: Field 1 is CHARACTERS
: Field 2 is CHARACTERS
: Field 3 is REAL
: Field 4 is INTEGER
: Field 5 is INTEGER(80)

EEEEK! (Sorry, the thought of implimenting the above scared me. :))

Let me make sure that I got this right. You would like to print messages like "You commited 5 line items to the database." where '5' and 'line items' can vary. If this correct then I came up with a method in SQL*Forms 3.0 to do this.

Table: MESAGES (MSG_CODE, MSG_LEVEL, FROM_NAME, MSG_TEXT)

Ex msg in db: ('005', 'I', NULL, 'You commited %NUM% %OBJS% to the database')

I created procedure that would display the message:

        Disp_Msg('I-005', '5|line items', 'NUM|OBJS');

The '|' were used as element separators. The procedure would parse message code and get the message text from the database. Then it would replace the place holders listed in the third parameter with the corresponding element on the second parameter. Then, of course, it would display the message.

This scheme seemed to make message handling more flexible and needed a lot fewer messages in the database. NOTE: I used hard-coded vaules in my example but the parameters could be dynamically generated.

Thying to make a flexible message system is very challengingh is the is many ways to do it. If you want more info on how this scheme was implemented, let me know.

Later,
Steven

 _   _  _ _  __ : Steven Whatley              \ The opinions expressed are my
|_  |_|  |  |   : System Analyst/Programmer    \ own.  You may freely copy,
 _| | | _|_ |__ : swhatle_at_starbase.neosoft.com  \_use,_or_ignore_them._______
                : Oracle CDE2 Ambassador: Ask questions about the CDE2 tools!
Scientific Applications International Corporation (An employee-owned company) Received on Wed Mar 15 1995 - 17:09:20 CET

Original text of this message