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-17 : 23:49:29
|
| I have a problem with Insert and Update Unicode data to databaseI can send Unicode data using string with N prefix (Ref 001)Below I write some line of my SP But It does not write Unicode data to table, it writes like ????????How to insert data using n prefix with Declared Variable?How can avoid this problem?Any other method to pass unicode data using SP?Please help me...column UnitName nvarcharSample Stored Procedure (SP)SP 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:---UPDATEltrtb_UnitSETUnitName=@UnitName, UtrID=@UtrIDWHERE UnitID=@UnitIDRef 001: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'Unicode String')From the URL,http://databases.aspfaq.com/general/why-do-some-sql-strings-have-an-n-prefix.htmlBut I need to know how to pass the data using stored procedure |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-06-17 : 23:52:31
|
what is the datatype for column UnitName ? nvarchar() also ? KH |
 |
|
|
pcperera
Starting Member
12 Posts |
Posted - 2007-06-17 : 23:53:22
|
| yes column UnitName nvarchar |
 |
|
|
|
|
|
|
|