SQL Server 2000 Simplified Chinese Character Data Transformation Example (com,.net)

Source: Internet
Author: User
SQL Server 2000 Simplified Chinese Character Data Transformation Example (com,.net)
First verify that the. Net Framework 1.1 is installed on Windows (the server side of the SQL Server, of course)!
Confirm after successful installation:
1. Create a strong-name key file for the class library using Sn-k:
Execute the following command line under the V1.1bin subdirectory in the directory where the Microsoft. Net Framework SDK is installed:
Sn.exe-k c:snkey.snk
2. Open Notepad (NotePad.exe) to write the following C # program and save as a C:microshaoft.cs file:
Using System;
Using System.Runtime.InteropServices;
Using System.Reflection;
Using System.Runtime.CompilerServices;
[Assembly:assemblykeyfile ("Snkey.snk")]
Namespace Microshaoft
{
public interface Istrings
{
String Stringconvert (string x);
}

[ClassInterface (Classinterfacetype.autodual)]
public class Strings:istrings
{
public string Stringconvert (String x)
{
Return Microsoft.VisualBasic.Strings.StrConv (X,microsoft.visualbasic.vbstrconv.traditionalchinese, System.Globalization.CultureInfo.CurrentCulture.LCID);
Simplified conversion can also stringconvert parameter control, do not repeat
}
}
}
3. Run cmd under Windows and go to the command line console and execute the following command line:
C:windowsmicrosoft.netframeworkv1.1.4322csc.exe/t:library/out:c:microshaoft.dll C:MICROSHAOFT.CS/R:C: Windowsmicrosoft.netframeworkv1.1.4322microsoft.visualbasic.dll
If there are errors, refer to csc.exe/? Help, or MSDN fix!
After confirming the correct execution, this example will generate: C:microshaoft.dll file!
4. Execute the following command line again:
C:windowsmicrosoft.netframeworkv1.1.4322egasm.exe C:microshaoft.dll/tlb:microshaoft.tlb/codebase

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.