Posts

Showing posts from May, 2020

School Management System In Oracle Apex

Image
School management system in oracle apex. view application here :  https://apex.oracle.com/pls/apex/f?p=104825:10::::::

FTP integration in oracle apex

Image
FTP integration in oracle apex 1. FTP Grants Required BEGIN DBMS_NETWORK_ACL_ADMIN.CREATE_ACL ( ACL => 'ftp.xml', DESCRIPTION => 'Network Access Control for HRDEPT', PRINCIPAL => 'HRDEPT',-- Schema name in which app is installed IS_GRANT => TRUE, PRIVILEGE => 'connect'); END; / -------------------------------------------------------------------------------- BEGIN DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE ( ACL => 'ftp.xml', PRINCIPAL => 'HRDEPT', IS_GRANT => TRUE, PRIVILEGE => 'connect', POSITION => NULL); DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE ( ACL => 'ftp.xml', PRINCIPAL => 'APEX_050100', IS_GRANT => TRUE, PRIVILEGE => 'connect', POSITION => NULL); DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE( ACL => 'ftp.xml', PRINCIPAL =>

Quantity increment-er in oracle apex

Image
Step 1: Create a page item & select type as a number field. Step 2: Under page item settings scroll down to pre & post text. PreText :  <button class="ui-datepicker-trigger a-Button a-Button--calendar"  id="minusButton45act" type="button" title="Remove" aria-label="Remove"><span class="t-Icon fa fa-minus-square" aria-hidden="true"></span></button> Post Text :  <button class="ui-datepicker-trigger a-Button a-Button--calendar"  id="plusButton45act" type="button" title="Add" aria-label="Add"><span class="t-Icon fa fa-plus-square" aria-hidden="true"></span></button> Step 3: Add below CSS code in the page inline CSS. CSS Properties :  #minusButton45act{     border-radius: 3px 0 0 3px;     margin-right: -1px;     color: red; } #plusButton45act {     border-radius: 0 3px 3px 0;     color: green; } Sa

Time difference between two timestamps in Apex

Subtracting two date values in Oracle results in number of DAYS. Therefore, you'd have to do some math in order to get hours (or minutes). Here's an example: col diff_days format 90 D00000 col diff_hours format 90 D00000 col diff_minutes format 90 D00000 with test as ( select to_date ( '29.12.2017 16:05' , 'dd.mm.yyyy hh24:mi' ) d_order , to_date ( '29.12.2017 16:39' , 'dd.mm.yyyy hh24:mi' ) d_now from dual ) select d_now - d_order diff_days , ( d_now - d_order ) * 24 diff_hours , ( d_now - d_Order ) * ( 24 * 60 ) diff_minutes from test ; OUTPUT DIFF_DAYS DIFF_HOURS DIFF_MINUTES --------- ---------- ------------ 0 , 02361 0 , 56667 34 , 00000

How to create network ACL in oracle apex?

Login to your database as a dba & run the below code. BEGIN   DBMS_NETWORK_ACL_ADMIN.append_host_ace (     host       => 'api.docparser.com',     lower_port => NULL ,     upper_port => NULL ,     ace        => xs$ace_type(privilege_list => xs$name_list('connect', 'resolve'),                               principal_name => ' YOURSCHEMA_USERNAME ',                               principal_type => xs_acl.ptype_db)); END;

How to convert amount in numbers to words.(currency in numbers to words)

Image
Step 1: Create the below function in your database. create or replace FUNCTION amount_in_words (i_amt IN NUMBER)    RETURN VARCHAR2 IS    n_dollar   NUMBER;    n_cents    NUMBER;    FUNCTION check_if_single (i_num IN NUMBER, currency IN VARCHAR2)       RETURN VARCHAR2    IS       FUNCTION n_spell (i_num IN NUMBER)          RETURN VARCHAR2       AS          TYPE w_Array IS TABLE OF VARCHAR2 (255);          l_str w_array                := w_array ('',                            ' thousand ',                            ' million ',                            ' billion ',                            ' trillion ',                            ' quadrillion ',                            ' quintillion ',                            ' sextillion ',                            ' septillion ',                            ' octillion ',                            ' nonillion ',                            ' decil

How to send SMS using plsql in oracle apex?

Step 1: Register for SMS sending API & get your credentials. (Here I used Twilio) Step 2: Create Network ACL. Step 3:  Create an Oracle Wallet Containing the Certificates Step 4: Create Procedure CREATE OR REPLACE PROCEDURE send_sms (     p_user       IN   VARCHAR2, -- Twilio user name     p_pass       IN   VARCHAR2, -- Twilio password     p_from       IN   VARCHAR2, -- Twilio From phone number     p_to         IN   VARCHAR2, -- Phone number of SMS recipient(s) colon delimited.     p_sms_body   IN   VARCHAR2 ) IS     t_http_req         utl_http.req;     t_http_resp        utl_http.resp;     lv_resp_line       VARCHAR2(32767);     lv_response_text   CLOB;     v_url              VARCHAR2(200) := 'https://api.twilio.com/2010-04-01/Accounts/'                            || p_user                            || '/SMS/Messages.xml';     lv_post_params     VARCHAR2(30000);     lv_from            VARCHAR2(100);     lv_to              VARCHAR2(100);     lv_sms_body        VARC

How to use single sign on (sso) in oracle apex?

Image
Step 1 : Login to your oracle apex workspace. Step 2: Go to Shared Components --> Security --> Authentication Schema Step 3: Click on the current authentication scheme Step 4: Scroll down & select session sharing TYPE = Custom & provide cookie name of your choice. this setting is to be set in all the applications in which you need to use a single sign-on. save and run the app.