Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

webutil, read registry with defaut entry?

113906Feb 9 2004 — edited Jun 28 2007
webutil, read registry not working well?

Hi,

I cannot read the default value for an entry in the registry.

if I read another value, it works fine.

On metalink, a note was giving an exemple that was doing that... but it doesn't work when I try it....
Doc ID: Note:121909.1
Subject: How to Open a File with its Associated Program from Forms ?

Here is my code, the first block works, but the others don't work. Could somebody explain me how do I do to access the default value?


PROCEDURE P_TEST IS
lv_valeur_retour1 VARCHAR2(255);
BEGIN
BEGIN
-- this works fine
lv_valeur_retour1 :=
CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY
('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows',
'Device',
TRUE);
message(lv_valeur_retour1);
pause;
EXCEPTION
WHEN NO_DATA_FOUND THEN
:F_RETOUR := '10';
END;
pause;
BEGIN
-- this doesn't work
lv_valeur_retour1 :=
CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY
('HKEY_CLASSES_ROOT\' || '.doc',
NULL,
TRUE);
message(lv_valeur_retour1);
pause;
EXCEPTION
WHEN NO_DATA_FOUND THEN
:F_RETOUR := '11';
END;
pause;
BEGIN
-- this doesn't work
lv_valeur_retour1 :=
CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY
('HKEY_CLASSES_ROOT\' || '.doc',
'Default',
TRUE);
message(lv_valeur_retour1);
pause;
EXCEPTION
WHEN NO_DATA_FOUND THEN
:F_RETOUR := '12';
END;
pause;
BEGIN
-- this doesn't work
lv_valeur_retour1 :=
CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY
('HKEY_CLASSES_ROOT\' || '.doc',
'(Default)',
TRUE);
message(lv_valeur_retour1);
pause;
EXCEPTION
WHEN NO_DATA_FOUND THEN
:F_RETOUR := '15';
END;
pause;
BEGIN
-- this doesn't work
lv_valeur_retour1 :=
CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY
('HKEY_CLASSES_ROOT\' || '.doc',
'0',
TRUE);
message(lv_valeur_retour1);
pause;
EXCEPTION
WHEN NO_DATA_FOUND THEN
:F_RETOUR := '14';
END;
pause;
BEGIN
-- this doesn't work
lv_valeur_retour1 :=
CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY
('HKEY_CLASSES_ROOT',
'.doc',
TRUE);
message(lv_valeur_retour1);
pause;
EXCEPTION
WHEN NO_DATA_FOUND THEN
:F_RETOUR := '13';
END;
END;


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2007
Added on Feb 9 2004
16 comments
7,156 views