I have a stored procedure which accepts a variable which contains data in non-English language. I know that we can use N
to do so. But it does not work with variables. How can I go about to achieve that?
I want to do something like this, but it does not work. Below is my stored procedure.
Create Procedure tempUpdateCustomerSurvey
(
@FeedbackText nvarchar(1000)
)
As
Begin
Update tblCustomerSurvey
Set GeneralFeedbackText = @FeedbackText
Where CustomerSurveyID = 1000
End
It stores '??????' in the table.
If I execute this SP with data like below, it does not work.
Declare @GeneralFeedbackText Nvarchar(1000) = 'नमस्कार'
Exec tempUpdateCustomerSurvey @GeneralFeedbackText
Know that the stored procedure accepts data from C# code. Below is the core C# method that calls the stored procedure.
public static Feedback InsertSurvey(int CustomerSurveyID, string GeneralFeedbackText)
{
try
{
int intDBReturnValue = Convert.ToInt32(SqlHelper.ExecuteScalar(SystemSettings.GetDBConnection(),
"tempUpdateCustomerSurvey",
CustomerSurveyID,
GeneralFeedbackText));
Feedback f = new Feedback(FeedbackService.DB_OP_SPECIFICATION.INSERT, intDBReturnValue, "Customer survey");
f.ProcessExceptionOrCustomErrorIfAvailable(-1, "System couldn't verify the survey information.");
return f;
}
catch (Exception ex)
{
return new Feedback(FeedbackService.DB_OP_SPECIFICATION.INSERT, ex, "Customer survey");
}
}