Oracle 10 Gb multi-language Storage

Source: Internet
Author: User

Server:

Database Character Set: ZHS16GBK

Database country character set: AL16UTF16

Client:

NLS_LANG: AL32UTF8

Environment variable:ORA_NCHAR_LITERAL_REPLACE =TRUE

 

This character set changes the client NLS_LANG and environment variables. If no default settings are changed, for example, the client NLS_LANG is still ZHS16GBK, and no environment variable settings are required, can the multi-country text be properly stored? If you use VB. net for development, try the following code:

..................

Dim conn As New System. Data. OracleClient. OracleConnection ("database conn string ")

Dim cmd As New System. Data. OracleClient. OracleCommand ("insert Into mer_categ (S_merc_name) Values (: S_merc_name)", conn)

Cmd. Parameters. Add ("S_merc_name", OracleClient. OracleType.NVarChar). Value = "zookeeper" conn. Open ()

Cmd. ExecuteNonQuery ()

Conn. Close ()

 

...............

The running results must satisfy you. Why can we directly and correctly write data to the database by setting the command parameter? The background processing mechanism remains unknown, however, I guess that the character is directly transmitted to the Oracle Server using the Unicode code of the national character set of the database, without any conversion of the character set.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.