Solved

insert arabic text in oracle table ?

Posted on 2003-10-26
7
1,457 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now