Solved

Unicode INSERT with Non-Unicode Database

Posted on 2012-03-29
6
219 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
Comment Utility
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 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
Comment Utility
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
Comment Utility
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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

Author Comment

by:gcook17
Comment Utility
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
Comment Utility
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
Comment Utility
This solution seems to be the only solution that relates to and affects the original question
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
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 video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now