12 Replies Latest reply: Apr 8, 2013 9:29 AM by HamidHelal RSS

    nvarchar2 data type

    G.Y
      Hi
      I have emp_ino table in oracle database 10g R2.

      emp_id Number(5);
      emp_name nvarchar2(50);

      I insert data through sql script its ok.
      In emp_name I used Arabic character.
      I creat A form module in oracle developer suite 10g R2 when I query record in forms 10g then it does not display in arabic format.
      please tell me what i have to do ?

      thanks
        • 1. Re: nvarchar2 data type
          Amatu Allah Neveen Ebrahim
          Al Slam Alikum ya Yassen
          do ur db server enabled Arabic character ; do ur db character set & nls_lang parameter set to Arabic ?
          Do ur registry nls_lang is correctly set to Arabic?
          pls verify these points cause if it wasn't correctly set this Will cause the problem ?

          pls verify the following link to help u answering these questions & solve ur problem

          Re: How can you type from RIGHT-to-LEFT (i.e. Arabic style) in Forms?

          Amatu Allah
          • 2. Re: nvarchar2 data type
            HamidHelal
            Ghulam Yassen wrote:
            Hi
            I have emp_ino table in oracle database 10g R2.

            emp_id Number(5);
            emp_name nvarchar2(50);

            I insert data through sql script its ok.
            In emp_name I used Arabic character.
            I creat A form module in oracle developer suite 10g R2 when I query record in forms 10g then it does not display in arabic format.
            please tell me what i have to do ?

            thanks
            check this {thread:id=1084709}

            Hope this helps

            Thanks..
            • 3. Re: nvarchar2 data type
              Christian Erlinger
              emp_name nvarchar2(50);
              First of all ist the table column you are inserting your data also of type nvarchar2 ? The NVARCHAR2 uses the National Characterset whereas VARCHAR2 uses the database characterset which means you could have a characterset conversion with possible data loss at hand when trying to insert NVARCHAR2 into VARCHAR2 or vice versa.

              The national characterset itself is simply there to support 2 different charactersets in your database; meaning when having a West-European Database Characterset you could switch the national characterset to something else if you'd need to support something else quickly.

              Personally I wouldn't go for it. The idea of having different charactersets with possible characterset conversions and data loss in one database sounds complicated enough; you'd have to worry everytime which datatype you have to use and how to convert it from characterset A to characterset B. The horrorstory continues when you plan to use another database characterset, as - you guessed it - the national characterset will make this also more complicated.

              The by far easier way is to use AL32UTF8 as Database characterset and forget about that there even is a National Chararacterset.

              cheers
              • 4. Re: nvarchar2 data type
                G.Y
                Dear sir christian erlinger
                thanks for info, can you plz tell me ho apply your method (AL32UTF8 )

                thanks
                Yassen
                • 5. Re: nvarchar2 data type
                  G.Y
                  Wa AlekumSalam waRehmatullah

                  thanks for reply. I visit the link but there is no solution for that question which you have mentioned.

                  can you please tell me how to write and display in oracle forms 10g Oman Arabic character.
                  Actually I want to write both types Character in one Item i.e. English and Oman-Arabic.

                  please guide me
                  • 6. Re: nvarchar2 data type
                    Amatu Allah Neveen Ebrahim
                    Will see which solution is suitable to ur case
                    Yassen, pls post the result of the following query ...
                    SELECT * FROM NLS_DATABASE_PARAMETERS;
                    pls note for using both language English &Arabic u have to use the following nls_lang
                    AMERICAN_AMERICA.AR8MSWIN1256
                    in registery u have about 3 parameters of nls_lang fill them with the above value

                    Amatu Allah

                    Edited by: Amatu Allah on Apr 8, 2013 4:44 AM
                    • 7. Re: nvarchar2 data type
                      Christian Erlinger
                      Read

                      - Changing the NLS_CHARACTERSET to AL32UTF8 / UTF8 (Unicode) [ID 260192.1]
                      - AL32UTF8 / UTF8 (Unicode) Database Character Set Implications [ID 788156.1]

                      on https://support.oracle.com

                      cheers
                      • 8. Re: nvarchar2 data type
                        G.Y
                        Dear Sir Amatu Allah
                        Yassen, pls post the result of the following query ...
                        SELECT * FROM NLS_DATABASE_PARAMETERS;
                        IT is my current settings for nls_database_parameters

                        see the file at below link
                        1) http://www.2shared.com/photo/5LxD0cOS/NLS_database_prameters.html

                        pls note for using both language English &Arabic u have to use the following nls_lang
                        AMERICAN_AMERICA.AR8MSWIN1256
                        in registery u have about 3 parameters of nls_lang fill them with the above value
                        In registry i found 2 paremters 1 for database and 1 of developer suit, where is 3rd one plz tel.
                        and see my current registry settings.

                        http://www.2shared.com/photo/o_JH5f5D/registery_settings.html

                        plz tel what i do next?
                        • 9. Re: nvarchar2 data type
                          Amatu Allah Neveen Ebrahim
                          Nice to share pics for pcs but not clear at all using my mobile answering a question
                          sorry for that... :(
                          Amatu Allah
                          • 10. Re: nvarchar2 data type
                            G.Y
                            Sir

                            Sir my problem is solved for Arabic and English writing,
                            I installed oracle developer and database again with both language Arabic and English.

                            these are my settings


                            plz check it now
                            for select * from nls_database_parameters;

                            NLS_CHARACTERSET               AR8MSWIN1256

                            for forms and database registery
                            NLs_LANG registery settings

                            ARABIC_OMAN.AR8MSWIN1256

                            Now the problem is that when i run forms run time or reports runtime it is running in Arabic . I want to run Forms, reports run time in English only data show in that format in which it is inserted.

                            plz tell
                            • 11. Re: nvarchar2 data type
                              G.Y
                              Dear Respected Sir
                              Amat ALAH and Hamid Helal.
                              I thank full both of you who helped me for diagnosing my Problem.

                              It is solved now.

                              what I did for that.

                              just Re-installed database 10g R2 and Developer Suit 10g R2 with Arabic and English language.
                              after that I go to my regeistry there I set
                              NLS_LANG = AMERICAN_AMERICA.AR8MSWIN1256

                              at three places.

                              I create new table as useuly we creating, then insert data from oracle forms in both languages (Arabic and English)

                              It is fine.
                              once again thanks.
                              Allah(Swt) always bless and succes both of you.

                              G.Yassen.
                              • 12. Re: nvarchar2 data type
                                HamidHelal
                                Ghulam Yassen wrote:
                                Dear Respected Sir
                                Amat ALAH and Hamid Helal.
                                I thank full both of you who helped me for diagnosing my Problem.

                                It is solved now.

                                what I did for that.

                                just Re-installed database 10g R2 and Developer Suit 10g R2 with Arabic and English language.
                                after that I go to my regeistry there I set
                                NLS_LANG = AMERICAN_AMERICA.AR8MSWIN1256

                                at three places.

                                I create new table as useuly we creating, then insert data from oracle forms in both languages (Arabic and English)

                                It is fine.
                                once again thanks.
                                Allah(Swt) always bless and succes both of you.
                                better to you :)