Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
pcperera
Starting Member
12 Posts |
Posted - 2007-06-15 : 03:25:45
|
| nsert and Update Unicode Below I write some line of my SP But I does not write Unicode data to table, it writes like ????????How can avoid this problemSP header:CREATE PROCEDURE ltrsp_AddEditUnit @UnitID char(4), @UnitName nvarchar(20), @UtrID intInsert:INSERT INTO ltrtb_Unit (UnitID,UnitName,UtrID) VALUES (@UnitID,@UnitName,@UtrID)Update:--- UPDATE ltrtb_Unit SET UnitName=@UnitName, UtrID=@UtrID WHERE UnitID=@UnitID |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-06-15 : 04:25:23
|
| the datatype must be nvarchar(20) not varchar_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
pcperera
Starting Member
12 Posts |
Posted - 2007-06-15 : 05:01:11
|
| thanks spirit1, it is nvarchar but don't work (Now I change it to nvarchar, thanks for mentioning it)*************I found a method to insert unicode data to table (Using N' prefix), but I want to add using declared variableINSERT INTO ltrtb_UserLevel (UserLevel,Description) VALUES (1,N'#3461;#3504;#3538;#3482;#3535;#3515;#3539;')http://databases.aspfaq.com/general/why-do-some-sql-strings-have-an-n-prefix.html |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-06-15 : 05:08:06
|
| i don't think i quite understand your problem.bot your column and the variabe must have the same datatype (nvarchar) with the same length._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
pcperera
Starting Member
12 Posts |
Posted - 2007-06-15 : 05:11:15
|
| I have stored procedure, I send unicode data using VB.NET command, but these data don't record in the table, it displays Like ?????, my problem is how to send unicode data to table (refer above question), |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-06-15 : 05:26:09
|
| displays like ??? where?_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
pcperera
Starting Member
12 Posts |
|
|
|
|
|
|
|