Możesz pobrać ten formularz z następującego linku: Modal_Msgt.fmbW tym przykładzie utworzyłem trzy alerty z następującymi nazwy:1. Good_Msg2. Komunikat o błędzie3. Ask_AlertNastępujący kod jest napisany dla przycisku „Pokaż dobrą wiadomość”, aby wyświetlić normalną wiadomość, możesz użyć tego kodu w dowolnym bloku PLSQL:Declare
-- create a numeric variable to hold show_alert return value
nalertbutton number;
Begin
-- set the message for alert
set_alert_property('good_msg', alert_message_text, 'Records saved successfully.');
-- after below statement the execution will hold till you click on ok.. becuase it is an modal window
nalertbutton := show_alert('good_msg');
:alertblock.result := 'That was a good message.';
-- after this you can perform any task...
End;
Poniższy kod jest napisany dla przycisku „Pokaż komunikat o błędzie”, aby wyświetlić komunikat o błędzie:Declare
-- create a numeric variable to hold show_alert return value
nalertbutton number;
Begin
-- set the message for alert
set_alert_property('error_msg', alert_message_text, 'An error occurred.');
-- after below statement the execution will hold till you click on ok.. becuase it is an modal window
nalertbutton := show_alert('error_msg');
:alertblock.result := 'That was an ERROR message.';
-- after this you can perform any task...
End; Poniższy kod jest napisany dla przycisku „Zapytaj o potwierdzenie”, aby poprosić o potwierdzenie:Declare
-- create a numeric variable to hold show_alert return value
nalertbutton number;
Begin
-- set the message for alert
set_alert_property('ask_alert', alert_message_text, 'Confirm Yes or No?');
-- after below statement the execution will hold till you click on ok.. becuase it is an modal window
nalertbutton := show_alert('ask_alert');
-- now check which button or answer have been choosen
if nalertbutton = alert_button1 then
:alertblock.result := 'You choose Yes.';
else
:alertblock.result := 'You choose No.';
end if;
-- after this you can perform any task...
End;
Subskrybuj, aby otrzymywać powiadomienia e-mail o najnowszych aktualizacjach, takich jak:
Wprowadź swój adres e-mail:
-
Utrzymywanie propagacji zawsze włączonej w strumieniach Oracle
-
Sprawdzenie, czy pozycja nie istnieje w innej tabeli
-
Czytanie clob linia po linii z pl\sql
-
Wyszukaj, czy liczba jest zawarta w wyrażeniu takim jak:1-3,5,10-15,20
-
Jak sprawdzić, czy kolumna istnieje przed dodaniem jej do istniejącej tabeli w PL/SQL?