Solved

insert arabic text in oracle table ?

Posted on 2003-10-26
7
1,665 Views
Last Modified: 2013-12-25
hi

 I am trying to pick an arabic values from one MS SQL table store that in an ORACLE table. But in oracle it shows as question marks.(??). this is query im using .

SQLQuery = "Insert into INVHDR(COMP_CODE)  values('" & ExpRecSet!briefNameArabic & "')

any helps!!

0
Comment
Question by:bincem
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 8

Expert Comment

by:MYLim
ID: 9624229
you should use:
-NChar
-NVarchar
0
 
LVL 8

Expert Comment

by:MYLim
ID: 9624285
1st. change your field type to NChar or NVarchar.
2nd.when insert to table,use 'N' + String like below:

SQLQuery = "Insert into INVHDR(COMP_CODE)  values(N'" & ExpRecSet!briefNameArabic & "')

EX:INSERT INTO UNicode_Table VALUES(1, N'Arabic_text');
0
 

Author Comment

by:bincem
ID: 9625012
hi mylim,

thanks for your reply.
but here situation is little different. I don't have the right to change the structure of oracle table. There the field type is 'varchar2'.

so any chances ??
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Accepted Solution

by:
MYLim earned 125 total points
ID: 9625159
below is the PAQ Accept Answer:
char (size 1 to 8000) will take always the same space in database, ie a CHAR(50) field will always need 50 bytes even if you only store 'Hello' in it.
varchar (size 1 to 8000) will take exactly the space you store in the database, for the rest it is identical to char
nchar/nvarchar (size 1 to 4000). Basically the same as char/varchar, but you can store data in several character sets (chinese and greek can be stored in the same table.

binary/varbinary: same as char/varchar, but data is NOT interpreted using character sets, but as is.
text: size up to 2GB, handling is much different as from the above, except if you keep the data really short.
ntext: same as text, but again character set is taken into account.
image: same as text, but again with NO character set implications

Which is the best one:
char: typically for small and fixed-size values (SSN, ISBN etc)
varchar: typically for variable size data (names), but for relatively small data
------------------------------------------------------------------------------------
nchar/nvarchar: same as above, but if you need different character sets
------------------------------------------------------------------------------------
binary/varbinary:  if you store binary data (not text), ie encrypted data (like passwords)
text/ntext: store large texts (full html pages for example)
image: store files, images etc

*******************************
My Opinion
*******************************
If we have other way to store Unicode,then wat's the use of NChar,NvarChar ?
*maybe have other way,but already out of my knowledge,sorry.
0
 
LVL 29

Expert Comment

by:leonstryker
ID: 9626260
bincem

Unless you can set the field in ORACLE to Nvarchar you will not be able to store unicode character sets in your ORACLE database.
0
 
LVL 1

Expert Comment

by:ayufans
ID: 10390694
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- answered by MYLim

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

ayufans
Cleanup Volunteer
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question