Unable to insert and retrieve Unicode data using Microsoft OLE DB Provider

Hi,
I have an ASP.NET web application that uses OLEDB connection to Oracle database.
Database: Oracle 11g
Provider: MSDAORA
ConnectionString: "Provider=MSDAORA;Data Source=localhost;User ID=system; Password=oracle;*convertNcharLiterals*=true;"
When I use SQL Develeoper client and add convertNcharLiterals=true; in sqldeveloper.conf then I am able to store and retrieve Unicode data.
The character sets are as follows:
Database character set is: WE8MSWIN1252
National Language character set: AL16UTF16
Select * from nls_database_parameters where parameter in ('NLS_CHARACTERSET','NLS_LENGTH_SEMANTICS','NLS_NCHAR_CHARACTERSET');
PARAMETER VALUE ---------------------------------------
NLS_CHARACTERSET WE8MSWIN1252
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CHARACTERSET AL16UTF16
I have a test table:
desc TestingUni
Name Null Type
UNI1 VARCHAR2(20)
UNI2 VARCHAR2(20)
UNI3 NVARCHAR2(20)
I execute the below mentioned query from a System.OleDb.OleDbCommand object.
Insert into TestingUni(UNI3 ) values(N'汉语漢語');
BUT when retrieving the same I get question marks (¿¿¿¿) instead of the Chinese characters (汉语漢語)
Is there any way to add the above property(convertNcharLiterals) when querying the Oracle database from OLEDB connection?
OR is there any other provider for Oracle which would help me solve my problem?
OR any other help regarding this?
Thanks

using OraOLEDB Provider.
set the environment variable ORA_NCHAR_LITERAL_REPLACE to TRUE. Doing so transparently replaces the n' internally and preserves the text literal for SQL processing.
http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements003.htm#i42617

Similar Messages

  • Write / store xml data in Xe and retrieve stored data using pl/sql

    Hi to all,
    i'm searching a tutorial on:
    A - how to write / store xml data in Xe and retrieve stored data using pl/sql
    I don't want to use other technologies, because i use htmldb and my best practice is with pl/sql.
    I was reading an ebook (quite old maybe) however it's about oracle 9 and it's talking about xmltype:
    1 - I don't understand if this is a user type (clob/varchar) or it's integrated in Oracle 9 however i will read it (it's chapter 3 titled Using Oracle xmldb).
    Please dont'reply here: i would be glad if someone can suggest me a good tutorial / pdf to achieve task A in Oracle XE.
    Thanx

    Thank you very much Carl,
    However my fault is that i've not tried to create the table via sql plus.
    Infact i was wrong thinking that oracle sql developer allows me to create an xmltype column via the create table tool.
    however with a ddl script like the following the table was created successfully.
    create table example1
    keyvalue varchar2(10) primary key,
    xmlcolumn xmltype
    Thank you very much for your link.
    Message was edited by:
    Marcello Nocito

  • Can we create TDMS file using C# and retrieve the data using a diadem

    I want to write a tdms file from a dot net application and to use the diadem to retrieve the data and to create a user defined report

    Hello,
    If you want this kind of output, you can use Java Mapping e.g
    1. Create your data type like this:
    CHARSET 0..1
    LOADMODE 0..1
    CODEFORMAT 0..1
    CURRENCY 0..1
    SUPPLIERID_DOMAIN 0..1
    ITEMCOUNT 0..1
    TIMESTAMP 0..1
    UNUOM 0..1
    COMMENTS 0..1
    FIELDNAMES 0..1
    DATA 0..unbounded
    ENDOFDATA
    2.In your message mapping assign all the constants. You might want to concat all the values of the FIELDNAMES and output them to DATA
    3.In your Java Mapping, replace all the XML fields including ,, with ,''',
    4.In ID, do not use FCC.
    Hope this helps,
    Mark

  • Sending and retrieving blob data using JSP

    I need to upload images to a database through a web page (jsp)
    and then display them.
    Environment is tomcat + mysql.
    Anyone know a good site that explains
    how to work with blobs through JSP?
    thanks for any help!

    hello Sir,
    I have to make a Image Library.
    What I have done is I am just stroing the Image Path into the path
    and retrieving the path from the database.
    But now I am asked to Store the Image in the Database..
    Could U Please tell me at the time of retrieving the Image
    what exactly I have to do..
    I am just 1 month new to JSP...(Practically)
    Could U please write me the Code for Converting the BINARY Data into
    InputStream ...
    or what exactlt I have to do..
    Please Guide me man..
    Thanks In Advance...
    With Regards
    Eklavya

  • Inserting and retrieving data from a al32UTF8 database USING SQL Developer

    hi guys,
    Before i post my questions , i think its better for me to provide you guys with my understandings first so that it easier to understand where/if i have gone wrong..
    I am using Window XP and Oracle 10g
    Non-unicode client - a client program that need to use the OS code page for mapping of the retrieved unicode data from the database as well as the support of displaying/inserting the characters from that code page to the database.
    E.G sqlplusw.exe
    Therefore, when using a non-unicode client
    1) we have to set the OS code page (Control panel - regional and language setting - advance - language for non unicode program ) to the code page that contain the characters we are going to display/insert.
    2) we will also have to set the NLS_LANG characterset to the character set of the code page we are going to insert so that when we do a insert (for e.g in thai ) , oracle will know, and auto conversion to UNICODE can take place. This is also true when we retrieve unicode data from the database so that conversion to the correct character set can take place.
    INSERTING
    THAI ---> conversion ----> UNICODE
    RETRIEVING
    THAI <---- conversion <---- UNICODE
    I hope my basic understanding is correct up till this point.
    Unicode client - a client program that supports the displaying/inserting of unicode characters without the need of setting the OS code page (Control panel - regional and language setting - advance - language for non unicode program )
    E.G isqlplus http or SQL developer
    However,
    1) There is still a need to set the NLS_LANG so that correct conversion can take place between the client and the database.
    For e.g, when retrieving if we set the NLS_LANG character set to ZHS16GBK (chinese) and the data store in unicode in database is E.G (THAI) , then the conversion would be wrong .
    Since it is a unicode supported client, then the NLS_LANG character set should be set to UNICODE as well.
    Here come my questions
    *Important - please help if you are busy and have no other time to answer the rest of the questions
    *Q1) If i were to use a unicode client, what should i set my NLS_LANG character set to ?
    AMERICAN_AMERICA.UTF8 ?
    *Q2) Where do i set the NLS_LANG character set information in SQL Developer, i know there is a metalink for setting NLS_LANG using isqlplus but i cant seems to google any result for SQL developer.
    Q3) Is my basic understanding right until this point ? If not, please explain in a more generalised term as i am really not familiar with character sets, code page, unicode , glyphs and fonts..
    Q4) If a unicode client does not need to refer to the OS code page (set in regional and language) , is there a UNICODE code page for the client to refer to , or is there any Window API available ?
    Q5)
    There is still a need to set the NLS_LANG so that correct conversion can take place between the client and the >>database.
    For e.g, when retrieving if we set the NLS_LANG character set to ZHS16GBK (chinese) and the data store in >>unicode in database is E.G (THAI) , then the conversion would be wrong .am i right on this point for UNICODE supported client ?
    Thanks for spending time to read my questions and i hope to hear advices from you guys soon.
    Million thanks again for sharing.
    Best Regards,
    Noob but willing to learn

    The requirement to always set NLS_LANG is not true for JDBC, which ignores NLS_LANG altogether. Java programs fetch text data into String variables, which use Unicode UTF-16 by design. JDBC sets character set conversion so that data is converted between UTF-16 and the database or national character set.
    The requirement to set NLS_LANG is not generally true for OCI, either. The first call in an OCI problem can be OCIEnvNlsCreate(). This call has two parameters that allow the caller to define the character set to use for VARCHAR2/CHAR/LONG/CLOB/statement text and the character set to use for NVARCHAR2/NCHAR/NCLOB. Only if these character sets are specified as 0, NLS_LANG character set is used. Also, OCI programs can specify different character sets for each bind or define variable (i.e. input/output buffer). Note: OCI programs always use NLS_LANG to initialize the language and territory settings for the client program and the database session. Only the character set can be specified is OCIEnvNlsCreate().
    OCIEnvNlsCreate() can specify the client character set as UTF-16 (in platform endianess). This is not possible with NLS_LANG.
    Various interfaces building on OCI, such as Oracle ODBC and ODP .NET, explicitly initialize OCI with Unicode character set, and thus ignore the NLS_LANG character set as well.
    Thnx,
    Sergiusz

  • How can u insert and retrieve text files in any format using forms6i.

    how can u insert and retrieve text files in any format using forms6i.
    can u give me an example of an insert statement, let's assume the file is located in the a:drive.
    and retrieving the files, i would give the user a list of all the files that are in the database, the user would select one, but what command(or piece of code) would open the file in its apppropriate editor.
    e.g .pdf formatted file would open in acrobat.
    any help would be appreciated.
    Thanks
    Hussein Saiger

    the filereference class is for downloading and uploading files.
    if you want to load xml, use the xml class.
    and, if you want to write to an xml file and don't want to use server-side code, wait.

  • How to store and retrieve blob data type in/from oracle database using JSP

    how to store and retrieve blob data type in/from oracle database using JSP and not using servlet
    thanks

    JSP? Why?
    start here: [http://java.sun.com/developer/onlineTraining/JSPIntro/contents.html]

  • Writing the file using Write to SGL and reading the data using Read from SGL

    Hello Sir, I have a problem using the Write to SGL VI. When I am trying to write the captured data using DAQ board to a SGL file, I am unable to store the data as desired. There might be some problem with the VI which I am using to write the data to SGL file. I am not able to figure out the minor problem I am facing.  I am attaching a zip file which contains five files.
    1)      Acquire_Current_Binary_Exp.vi -> This is the VI which I used to store my data using Write to SGL file.
    2)      Retrive_BINARY_Data.vi -> This is the VI which I used to Read from SGL file and plot it
    3)      Binary_Capture -> This is the captured data using (1) which can be plotted using (2) and what I observed is the plot is different and also the time scare is not as expected.
    4)      Unexpected_Graph.png is the unexpected graph when I am using Write to SGL and Read from SGL to store and retrieve the data.
    5)      Expected_Graph.png -> This is the expected data format I supposed to get. I have obtained this plot when I have used write to LVM and read from LVM file to store and retrieve the data.
    I tried a lot modifying the sub VI’s but it doesn’t work for me. What I think is I am doing some mistake while I am writing the data to SGL and Reading the data from SGL. Also, I don’t know the reason why my graph is not like (5) rather I am getting something like its in (4). Its totally different. You can also observe the difference between the time scale of (4) and (5).
    Attachments:
    Krishna_Files.zip ‏552 KB

    The binary data file has no time axis information, it is pure y data. Only the LVM file contains information about t(0) and dt. Since you throw away this information before saving to the binary file, it cannot be retrieved.
    Did you try wiring a 2 as suggested?
    (see also http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=925 )
    Message Edited by altenbach on 07-29-2005 11:35 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Retrive_BINARY_DataMOD2.vi ‏1982 KB

  • I am unable to upload the customer master data using BAPI.?

    Hi Guru's,
    i am unable to upload the customer master data using BAPI.(BAPI_CUSTOMER_CREATEFROMDATA1)
    Please guide me how upload the data...
    Thanks in iadvance
    Srinivas...

    Hello Srinivas
    This BAPI does not allow to create a new customer from scratch but only to copy an existing customer to a new one and change its address data.
    The reference customer has to be provided using IMPORTING parameter PI_COPYREFERENCE. See also the BAPI documentation for more details.
    The BAPI does the same like transaction XD01 with Reference.
    Regards
      Uwe

  • How can i save and retrieve blob data through forms and reports...

    I have blob data type column and I want to save word, html, gif
    document in oracle database through forms 6 and retrieve the
    data into forms and reports.
    Details : I want to open .doc,.html,.gif file through a button
    and save it ..and i want retrieve the data into text item same
    in reports....
    If anybody have the answer then send me at
    [email protected]

    use ole container
    initialize the container with the filename (doc or gif)
    Edited by: arshid on Feb 8, 2009 1:57 PM

  • Connecting webservice and retrieve the data in json format.

    Hi,
    I need to connect to web service using java and retrieve the data in the format of JSON.
    I'm pretty new to this kind of technology, so kindly inform me about the class which are to be used.
    Thanks in advance

    There isn't one class that will solve your problems. You need to use many classes, and it's not a trivial task.

  • Outlook 2010 Client - "unable to connect to retrieve additional data" for some Distribution lists

    We have a mix of Outlook 2003, 2007 and 2010 clients in our organization.
    Users with an outlook 2010 client are having issues with a number (not all) of our distribution lists.
    Issues: When selecting a distribution list in the new message 'to' fiedl, a 'message tip' appears with the name of the DL and 'contains xx recipients'.
    However, when attempting to expand the DL (selecting the + sign) the following prompt appears "Cannot perfrom the requested operation. The command selected is not valid for this recipient. The operation failed"
    When selecting the DL through the outlook address book the memberlist is empty and has a mail tip "unable to connect to retrieve additional data".
    The DL's were all created in a 2003 environment.
    We are currently setting up a 2010 environment, and all DL's were created prior to any schema updates etc.
    Of note, users experience the issue, but access the list through OWA don't have the issue.

    Please also perform the following steps to troubleshoot the issue.
    1. Temporarily turn off firewall and antivirus program on the problematic machine for a test.
    2. Remove the Outlook profile completely and create a new profile.
    3. Login on the same mailbox by Outlook 2010 on another machine to check the result.
    If the issue persists, please open Event Viewer and check whether any error message exists. If so, please post it here for research.
    Thanks.
    Novak Wu-MSFT

  • TS1814 Can i reset my phone or factory restore my phone and retrieve my data without a computer.

    Can i reset my phone or factory restore my phone and retrieve my data without a computer.

    No, you need a computer. Or take the device to an Apple store.

  • I have download but i am unable to insert icon of acrobat to use so pls tell me how can i do this

    I have download but i am unable to insert icon of acrobat to use so pls tell me how can i do this

    Please explain "unable to insert icon of Acrobat"? What are you trying to do?

  • 2 time zones during inserting and selecting the data.

    we have applied DST patch and DST JAVA patch sucessfuly on oracle 10.1.0.3 version database . After that we have problem
    It was noticed that it failing for the following 2 time zones during inserting and selecting the data.
    MST7
    HST10
    Please help me to solve this

    Try MetaLink. Lots of hits on ORA-1882.
    Specifically, Note 414590.1 "Time Zone IDs for 7 Time Zones Changed in Time Zone Files Version 3 and Higher, Possible ORA-1882 After Upgrade" sounds promising.
    -Mark

Maybe you are looking for

  • How to display an image located in the WEB-INF directory?

    Basically, When a user registers, they a directory is created with their username that holds images that they can upload. How do I display those images. All I am holding in the database is the location of the images. ive tried <img src="/WEB-INF/user

  • Materialized view with  a dynamic column.

    Hi, Is it possible to use the materialized view as a function. A column of the view is dynamic, meaning we enter a parameter in the view. thanks

  • Form window not printed

    Hi, I'm working on a form in transaction SE71. I used graphical form painter and created a new form window. In "edit text" I copied the code from another window. The code just prints a logo and some text. The point was just to see that the new window

  • Value in CFQUERYPARAM

    I'm cleaning up some codes and start using <cfqueryparam> tags in all the queries. There is one query that I'm not 100% sure how to convert to cfqueryparam : INSERT INTO sometable (Column_1,Column_2, .......) VALUES ( '#Value_1#', '#Value_2# #Value_3

  • OSX10.8.3 and Windows 8 BootCamp

    I was already running Windows 8 64 in a BootCamp partition on My MacBook Pro 2011 model but did not have sound. I just downloaded the Windows support drivers and installed them in the Win 8 partition - as far as I can tell everything is working fine.