i have an sql express db with a table, containing a nvarchar(max) field.
If i add a text in SQL Management Studio, for example, running the query: UPDATE table SET htmlcontent=N'text with special character: SS' WHERE id = 1
everything is working fine!. The special unicode character S is saved into the field.
In ASP i have a generic handler which handles my data communication to and from the database. No matter what i try there, the S char is not accepted and
changed into a question mark. I have tried several things in SQL:
- stored proc with sp_executesql and parameters
- hardcoded query in the ashx file..
sqlStr = "UPDATE ELEMENTS SET htmlcontent=N'" & myCleanResult & "' WHERE id=" & id
connStringSQL = New SqlConnection(mySqlConnection)
Dim myAdapter1 As New SqlCommand(sqlStr, connStringSQL)
result = myAdapter1.ExecuteScalar()
View Complete Post