You are getting this because you probably have not used NVARCHAR as the datatype for that column. Also while saving you should prefix N before the column value.
If column data type is NVARCHAR then you can insert any Unicode value and it will be stored successfully, but if your column data type was different while inserting data the those unicode values will be stored as '??????'.
mounika mounika47 reputationPosted Jun 10, 2016, 1:01 AM EDT
0
hi nitin
can you remove the N in insert statement and exucute
it will be getting ?????? istead of text .
so we have to pass N as parameter how can we pass it.
How to prefix N in the Insert statement of the stored Procedure so that when we enter the regional text ???? will not be displayed
0
NitinRank #455 · 5.5K reputationPosted Jun 10, 2016, 2:10 AM EDT
0
Try this script with your application. This should work. Use the following in your cs file:
var cmd = new SqlCommand("your_sp_name", sqlConn); var sp_param = new SqlParameter("@sp_variable", SqlDbType.NVarChar); sp_param.Value = "unicode_chars_string_value"; cmd.Parameters.Add(sp_param); - See more at: http://www.discuzfeed.com/code/llprhtrs-how-to-implicitly-add-the-n-in-the-prefix-for-nvarchar.html#sthash.s4RfXBOX.dpuf
mounika mounika47 reputationPosted Jun 10, 2016, 2:17 AM EDT
0
Thanks nitin for your help
I was able to solve the Issue.
If our table Columns datatype is Nvarchar then we don't need to prefix any 'N' Character to our stored Procedure Parameters. I have added my tables Image below
enter image description here
Here is the stored Procedure which i have used:
CREATE PROCEDURE [dbo].[usp_UpdateSubCategoryDetails] -- Add the parameters for the stored procedure here @SubCategoryID INT, @SCDetailsHeading NVARCHAR(300), @SCDetailsDescription NVARCHAR(3000), @IMAGE NVARCHAR(100) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON;
-- Insert statements for procedure here
INSERT INTO tblSubCategoryDetails(SubCategoryID,SCDetailsHeading,SCDetailsDescription,[Image],IsActive)
Avikshith AradhyaRank #4,672 · 331 reputationPosted Jun 9, 2016, 10:10 PM EDT
mounika mounika47 reputationPosted Jun 9, 2016, 10:11 PM EDT
mounika mounika47 reputationPosted Jun 9, 2016, 10:13 PM EDT
mounika mounika47 reputationPosted Jun 9, 2016, 10:14 PM EDT
NitinRank #455 · 5.5K reputationPosted Jun 9, 2016, 10:16 PM EDT
mounika mounika47 reputationPosted Jun 9, 2016, 10:20 PM EDT
NitinRank #455 · 5.5K reputationPosted Jun 9, 2016, 10:24 PM EDT
Avikshith AradhyaRank #4,672 · 331 reputationPosted Jun 9, 2016, 10:25 PM EDT
NitinRank #455 · 5.5K reputationPosted Jun 9, 2016, 10:27 PM EDT
mounika mounika47 reputationPosted Jun 10, 2016, 12:18 AM EDT
NitinRank #455 · 5.5K reputationPosted Jun 10, 2016, 12:38 AM EDT
mounika mounika47 reputationPosted Jun 10, 2016, 1:01 AM EDT
NitinRank #455 · 5.5K reputationPosted Jun 10, 2016, 2:10 AM EDT
mounika mounika47 reputationPosted Jun 10, 2016, 2:17 AM EDT
NitinRank #455 · 5.5K reputationPosted Jun 10, 2016, 3:27 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts