Are you facing problems during Apple ID account review with iTunes? Here is the solution to get your Apple ID account reviewed with iTunes smoothly without entering credit card details.

Sometimes it got stuck during Apple ID account review by iTunes, I don't know exactly what is the reason but it occurs if you are registering from India or any other country other than US. Also if you will create account then you will not get the None option in payment method section, it means you have to enter the credit card details while reviewing the account with iTunes. Which seems not good if you don't want to make purchases accidentally.

Get reviewed apple id account by itunes without getting stuck

So the solution is to register your Apple ID account with iTunes without having any problem and without entering your credit card details by downloading iTunes software on your computer system (you can download with the following link http://www.apple.com/in/itunes/download/) then follow the following steps:

Install the iTunes software on your computer then run the software.

Scroll down in the software and click on the Change Country option as shown in below image.

iTunes change country option

After clicking on the change country option you will get the list of country as shown below, then select the United States.


After clicking on the United States link just register a new Apple ID account by clicking on profile button as shown below.


Then simple enter your details and choose None in payment method and your account will be created without credit card details and reviewed automatically with iTunes.

Now you can login into your Apple iPhone with the registered Apple ID easily.

I have written many posts related to triggers in Oracle Forms, I have given examples for Form Level triggers, Data Block Level triggers and Item Level Triggers. And in this tutorial I am just giving the simple tutorial to how to create a trigger in Oracle Form's object navigator.

Create Form Level Trigger

1. Click on the Triggers node just below the Form name and then click on + icon.

Create form level trigger in oracle forms developer

2. Then Trigger Dialog window will open then select trigger you want to create and click on OK button.

Trigger list of Form level triggers in Oracle form

3. The Code Editor window will open then write your trigger code.

Form level trigger code editor in Oracle Form.

Create Data Block Level Trigger

1. Click on the Triggers node just below the Block Name and click on the + button.

Create block level trigger in Oracle Form.

2. Trigger dialog window will open the select the trigger you want to write and click on OK button.

Block level trigger list in Oracle Forms.

3. Then the Code Editor window will open and here you can write your code.

Code editor of Block level trigger in Oracle Forms.

Create Item Level Trigger

1. Click on the Triggers node just below the item for which you want to create the trigger and then click on + button.

Create item level trigger in Oracle Form.

2. Trigger dialog window will open then select the trigger and click on OK button.

Item level trigger list in Oracle Forms.

3. The Code Editor window will open then write your code.

Code editor of Item level trigger Oracle Forms.

To attach a PL/SQL library in the Oracle Forms follow the following steps:

1. Click on Attached Libraries node in Object Navigator and then click on + button.

Attach library in oracle form

PLSQL attached libraries

2. Attach Library dialog window will open, then click on the Browse button to locate the .PLL file (extension of PL/SQL library in Oracle Forms).


3. After that click on Attach button to attach the selected library and then it will ask you to Remove Path then click on No button as shown below:

Attach a library in oracle forms

4. The library is now attached to your form.

Learn to attach library in Oracle d2k


You are creating a PL/SQL Procedure in Oracle in which you are doing processing while looping through the cursor and if any error (exception) raises then you don't want to abort the processing but you want to log the error and to continue the processing.

Below is the example is given to handle such condition, in which I have created two exception sections, first one is to handle the error while cursor loop and the other one is to handle exception outside the cursor loop.

SET SERVEROUTPUT ON;

DECLARE
   CURSOR c_emp
   IS
      SELECT ROWNUM, empno, ename FROM emp;

   vn        NUMBER;
   vsqlcode   VARCHAR2 (20);
   vsqlerrm   VARCHAR2 (4000);
BEGIN
   FOR c IN c_emp
   LOOP
      BEGIN
         IF c.ROWNUM = 3
         THEN
            -- Generate an error at line 3
            vn := 'x';
         END IF;

      EXCEPTION
         WHEN OTHERS
         THEN

            vsqlcode := SQLCODE;
            vsqlerrm := SQLERRM;

            INSERT INTO error_log (error_no, ERROR_TEXT)
                VALUES (vsqlcode, vsqlerrm);
      END;
   END LOOP;

   COMMIT;
EXCEPTION
   WHEN OTHERS
   THEN
 
            vsqlcode := SQLCODE;
            vsqlerrm := SQLERRM;

      ROLLBACK;

            INSERT INTO error_log (error_no, ERROR_TEXT)
                VALUES (vsqlcode, vsqlerrm);

      Commit;
END;
Continue Cursor loop processing after an error in Oracle

An Oracle function example is given below to calculate number of days between two dates. Just pass two dates as parameter to this function and it will return the number of days, which you can use in your SQL query.

Below is the function to get the number of days between two dates in Oracle:

CREATE OR REPLACE FUNCTION get_days (i_from_date IN DATE, i_to_date IN DATE)
   RETURN NUMBER
IS
   v_days   NUMBER;
BEGIN
   SELECT TRUNC (i_to_date) - TRUNC (i_from_date) + 1 INTO v_days FROM DUAL;

   RETURN v_days;
EXCEPTION
   WHEN OTHERS
   THEN
      RETURN 0;
END;
/

You can make it more custom as per your requirement. Below is the example for above function to use in SQL query:

SELECT get_days (TO_DATE ('11apr2016'), TO_DATE ('15apr2016')) AS days
  FROM DUAL;

Or call it through PL/SQL anonymous block:

SET SERVEROUTPUT ON;

DECLARE
   retval        NUMBER;
   i_from_date   DATE;
   i_to_date     DATE;
BEGIN
   i_from_date := '11apr2016';
   i_to_date := '15apr2016';

   retval := get_days (i_from_date, i_to_date);
   DBMS_OUTPUT.put_line ('Number of days :' || retval);
END;
/
Calculate number of days between two dates in Oracle by a function

You have an Oracle Form in which you have multiple data blocks and requirement is to commit just one data block changes and not to effect any other data blocks. But suppose you have a commit_form button also in form which will commit all the data block changes and that functionality is ok and it should be there. But for a specific block there is a requirement to commit only that block changes when edited.

If you got this kind of requirement then you can insert and update records from that data block to database externally, I mean using insert and update statements and not by Oracle form's default commit behavior.

To accomplish this task you need to give a push button to the user to save explicitly that data block changes. I have created a form for this example and below is the screen shot of this form:

You can download this form with the following button: Download

As you can see in above picture, there are two blocks, first one is Department and the second one is Employees and there is a push button labeled Commit Employees. In this form if user will change the data in both data blocks and presses the Commit Employees button then it will save only the Employees data block changes.

Following is the code is written in Commit Employees button to perform this task:

DECLARE
   CURSOR c_emp (p_emp emp.empno%TYPE)
   IS
      SELECT 'Y'
        FROM emp
       WHERE emp.empno = p_emp;

   v_exists   VARCHAR2 (1);
BEGIN
   GO_BLOCK ('Emp');
   FIRST_RECORD;

   LOOP
      IF :SYSTEM.record_status = 'CHANGED'
         OR:SYSTEM.record_status = 'INSERT'
      THEN
         OPEN c_emp (:emp.empno);

         FETCH c_emp INTO v_exists;

         CLOSE c_emp;

         IF NVL (v_exists, 'N') = 'Y'
         THEN
            UPDATE emp
               SET ename = :emp.ename,
                   job = :emp.job,
                   mgr = :emp.mgr,
                   hiredate = :emp.hiredate,
                   sal = :emp.sal,
                   comm = :emp.comm,
                   deptno = :emp.deptno
             WHERE empno = :emp.empno;
         ELSE
            INSERT INTO emp (empno,
                             ename,
                             job,
                             mgr,
                             hiredate,
                             sal,
                             comm,
                             deptno)
                VALUES (:emp.empno,
                        :emp.ename,
                        :emp.job,
                        :emp.mgr,
                        :emp.hiredate,
                        :emp.sal,
                        :emp.comm,
                        :emp.deptno);
         END IF;
      END IF;

      IF :SYSTEM.LAST_RECORD = 'TRUE'
      THEN
         EXIT;
      END IF;

      NEXT_RECORD;
   END LOOP;

   FORMS_DDL ('commit');
   -- REQUERY TO REFRESH CHANGES
   CLEAR_BLOCK (no_validate);
   GO_BLOCK ('dept');
   CLEAR_BLOCK (no_validate);
   EXECUTE_QUERY;
EXCEPTION
   WHEN OTHERS
   THEN
      FORMS_DDL ('rollback');
      MESSAGE ('error occurred.');
END;

What this above code will do is, it will check if record status is changed or new and then it will check from database that the record exists or not and if exists then it will update else will insert a new record.

More Topics

V. Kapoor

{picture#https://3.bp.blogspot.com/-q3wCssWUHo8/ViDFfCpPEuI/AAAAAAAAD0M/MHPvgnl3T3U/s1600/authpic.JPG} Vinish Kapoor is a Software Consultant, currently working in a reputed IT company in Noida, India and doing blogging on Oracle Forms, SQL and PLSQL topics. He is an author of an eBook Oracle Forms Recipes, which is available on Google play. {facebook#https://www.facebook.com/foxinfotech2014} {twitter#https://twitter.com/foxinfotech} {google#https://plus.google.com/u/0/+VKapoor/posts}
Fox Infotech. Powered by Blogger.