MessageTable

rguillen

Member²
Hi all,

How I Interpret "The name of this message table is defined at the session level" to define this table in my database.

I can define this table as any other tables?
I need create this whit the some user or system user.

Any idea is welcome. :)

Thanks!.
 
The table must be created like this:
Code:
create table my_messages
(
  Constraint_Name varchar2(30) not null,
  Actions         varchar2(3)  not null,
  Parent_Child    varchar2(1)  not null,
  Error_Message   varchar2(2000)
);
You can also add indexes of course. Your application users must have select privileges to this table, and you should probably also define a public synonym or private synonyms for this table, or provide the schema with the message table property.
 
Hi Marco,

Thank you for your answer. One question more.

Can I add one more column for the languaje to this table?

If yes, how can I select the appropriate languaje in the aplication?

Thanks.

Richard.
 
For this you would need to create a table with the columns mentioned above + a new language column. Next you should create a view that returns the message records for the appropriate language of the user. Perhaps you have a preferences table for the user, or perhaps you have a package where you can set such a preference in a global variable. This language column or global language variable can be used in the where clause of the view.

The MessageTable property should contain the name of this view.
 
Originally posted by Marco Kalter:
... or perhaps you have a package where you can set such a preference in a global variable. This language column or global language variable can be used in the where clause of the view.
...
Let me know how I can reference name of global package variable in the view, AFAIK you can only reference functions(standalone and packaged. Seems that Oracle DB shares my opinion:


Code:
create package mumu as
x number :=1;
end;
/

select * from dual where mumu.x=1

ORA-06553: PLS-221: 'X' is not a procedure or is undefined

Code:
create or replace package mumu as
x number :=1;
function fx return number;
end;
Package created

create or replace package body mumu as
function fx return number is
begin
  return x;
end;
end;
Package body created

select * from dual where mumu.fx=1
DUMMY
-----
X
 
Back
Top