I've picked more accurate details.
It's an upgrade program which should be run from a bat file in Windows NT.
The program check someting in the database and after it finds it,it has to get out to the OS level and print the message there for the field engineer which install the program.
i need something instead of the RAISE_APPLICATION_ERROR,becuase i don't want to get out from the installation program.
this is the code:
DECLARE
l_ConfigPartition VARCHAR2(255);
l_GlobalCount1 number;
l_GlobalCount2 number;
l_GlobalCount3 number;
BEGIN
BEGIN
Select VALUE
INTO l_ConfigPartition
from LC_CONFIG where ID = 3542;
END;
IF (l_ConfigPartition = '1') THEN
-- IF THERE ARE GLOBAL CASE TYPES
begin
Select count(PERMISSIONS)
into l_GlobalCount1
from CM_CASE_TYPES
where PERMISSIONS = 0;
end;
IF (l_GlobalCount1>0) THEN
RAISE_APPLICATION_ERROR (-20001, 'The system is configured to use Partitioning but there are some
Cases/Filters/Phonebook groups defined as Global. Please contact Customer Support.');
END IF;
-- IF THERE ARE GLOBAL FILTERS
begin
Select count(PERMISSION_TYPE)
into l_GlobalCount2
from FILTERS
where PERMISSION_TYPE = 0;
end;
IF (l_GlobalCount2>0) THEN
RAISE_APPLICATION_ERROR (-20002, 'The system is configured to use Partitioning but there are some
Cases/Filters/Phonebook groups defined as Global. Please contact Customer Support.');
END IF;
-- IF THERE ARE GLOBAL PHONEBOOK GROUPS
begin
Select count(PERMISSION)
into l_GlobalCount3
from NOI_GROUPS
where PERMISSION = 0;
end;
IF (l_GlobalCount3>0) THEN
RAISE_APPLICATION_ERROR (-20003, 'The system is configured to use Partitioning but there are some
Cases/Filters/Phonebook groups defined as Global. Please contact Customer Support.');
Well if its normal VB or any other front end, u can put this in a procedure with the out parameters,,and access those out parameters while calling in the front end.
but in ur case being a anonymous pl/sql block and running from a DOS batch program, i m not very clear about this.
Bookmarks