Solved

Unicode INSERT with Non-Unicode Database

Posted on 2012-03-29
6
224 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
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.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
A simple description of email encryption using a secure portal service. This is one of the choices offered by The Email Laundry for email encryption. The other choices are pdf encryption which creates an encrypted pdf of your email and any attachmen…

911 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

22 Experts available now in Live!

Get 1:1 Help Now