Solved

insert arabic text in oracle table ?

Posted on 2003-10-26
7
1,554 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
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

828 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