[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Storing/Retrieving UNICODE To SQL Server2000 Using VB.NET

Posted on 2003-11-13
8
Medium Priority
?
447 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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

656 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