?
Solved

Storing/Retrieving UNICODE To SQL Server2000 Using VB.NET

Posted on 2003-11-13
8
Medium Priority
?
445 Views
Last Modified: 2007-12-19
hi,

  i m doing some window application uding VB.net, due to some reason i need to know how to store & retrieve UNICODE ,let say using UTF8 to & from SQL Server 2000. Anyone have solution for this? Thanks

 
0
Comment
Question by:tayleeming
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 5

Expert Comment

by:mondayblueboy
ID: 9746047
Please let me know if the link below could help
http://www.experts-exchange.com/Programming/Q_20717813.html
0
 
LVL 4

Expert Comment

by:timmyt851
ID: 9751478
Can't you just use nvarchar and ntext fields? I don't think you need to do anything differently in VB, as long as the SQL column type supports unicode (the ones that start with "n").

TIM
0
 

Author Comment

by:tayleeming
ID: 9760900
hi,
  Actually i already do something about it and now i wish to know is the way i doing thing is correct.

My Objective : to store the information(especially chinese character) in SQL Server 2000 as UNICODE(using UTF8 format)

Now, i have manage to store the data inside SQL Server 2000 as something similar as below

Field Name : CustName
Data Type : nvarchar
Length : 4000
Data : n233n131n145n229n136n169n230n152n142


What i do is i take the data that user input and convert it to something like this

n233n131n145n229n136n169n230n152n142

then i store in database

when retrieve, i convert it back to the character or string that as the user input early

is this the correct way of doing it? or else?

coz i found that this way will take up alot of storing storega than usual
0
What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

 
LVL 4

Expert Comment

by:timmyt851
ID: 9761674
I'm curious, what happens if you just try storing the actual characters into an nvarchar field? Does it break or what happens? I was under the impression that nvarchar fields could store that kind of information without any conversion.

TIM
0
 

Author Comment

by:tayleeming
ID: 9761720
to timmyt851

    i try the way u comment, but seem like the SQL Server will store the chinese character i insert in a different way, which is normally display as ???? Then when i retrieve it out, it also display as ????...
0
 
LVL 5

Accepted Solution

by:
mondayblueboy earned 300 total points
ID: 9761730
Hope the following links can give you better explanation,

INF: Unicode String Constants in SQL Server Require N Prefix
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q239/5/30.ASP&NoWebContent=1

Data Access (SQL Server) (ADO.Net)
http://www.developersdex.com/gurus/articles/500.asp?Page=6

Unicode Support in SQL Server 7.0 Simplifies International Localization
http://www.cplus-zone.com/tips/Tip/13109
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10267948
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: mondayblueboy {http:#9761730}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0

Featured Post

Docker-Compose to Simplify Multi-Container Builds

Our veteran DevOps Author takes you through how to build a multi-container environment, managed with a single utility in order to simplify your deployments.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

800 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