Solved

Unicode INSERT with Non-Unicode Database

Posted on 2012-03-29
6
226 Views
Last Modified: 2012-08-13
Is it possible to use a unicode INSERT or UPDATE statement (i.e.: N'String') into a non-unicode database? I have that situation and it doesn't seem to throw any errors and does Insert the data correctly so far, which is surprising to me. What gotchas could I expect if any in this situation?

Application is a VB.NET 2005 app front-end to a SQL 2005 -2008 R2 database.
0
Comment
Question by:gcook17
6 Comments
 
LVL 20

Expert Comment

by:BuggyCoder
ID: 37785812
Make sure that the column datatype is NVarchar, Then if you insert hindi text into this column, to display it properly in SSMS you need to have that hindi font in which the text was written before bieng stored.

try testing it with websites that display regional or international language content, one such example in wikipedia....
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 37785930
String functions in the database server may have a problem when the characters don't match the collation.
0
 
LVL 14

Expert Comment

by:nishant joshi
ID: 37785980
please give a vb code that you have use for insert and update.
there is no relation between sql unicode and non unicode string and vb strings.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:gcook17
ID: 37787431
Here is an example of an INSERT query generated from the VB code:

INSERT INTO Orders ([ordernum],[department],[hours],[tasknum],[requestor],[status],VALUES (111,N'Facility Support Lines - XYZ',0,5196,N'No Requestor - 338',N'Active'

The application generates SQL for INSERTS and UPDATES. strings are prefixed with "N" to represent a unicode value. These SQL statements are executed against a SQL Server database.
0
 

Author Comment

by:gcook17
ID: 37787437
OK so one problem could be inserting unicode strings into a non-unicode database field could throw off the collation for that column. That's one issue.
0
 

Author Closing Comment

by:gcook17
ID: 37824082
This solution seems to be the only solution that relates to and affects the original question
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

809 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