[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

Unicode INSERT with Non-Unicode Database

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
gcook17
Asked:
gcook17
1 Solution
 
BuggyCoderCommented:
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
 
Dave BaldwinFixer of ProblemsCommented:
String functions in the database server may have a problem when the characters don't match the collation.
0
 
nishant joshiTechnology Development ConsultantCommented:
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
Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
gcook17Author Commented:
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
 
gcook17Author Commented:
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
 
gcook17Author Commented:
This solution seems to be the only solution that relates to and affects the original question
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now