Solved

insert arabic text in oracle table ?

Posted on 2003-10-26
7
1,396 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
Comment Utility
you should use:
-NChar
-NVarchar
0
 
LVL 8

Expert Comment

by:MYLim
Comment Utility
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
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 8

Accepted Solution

by:
MYLim earned 125 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…

771 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

12 Experts available now in Live!

Get 1:1 Help Now