I am trying to insert square root symbol √
into my SQL Server
database from an ASP.NET
page. The radical symbol (√
) gets inserted as letter v
instead.
Where could I be going wrong?
Thanks for your assistance.
I am trying to insert square root symbol √
into my SQL Server
database from an ASP.NET
page. The radical symbol (√
) gets inserted as letter v
instead.
Where could I be going wrong?
Thanks for your assistance.
Your database column type should be nVarChar to insert Unicode
characters.
Also you need to pass values like below:
cmd.Parameters.Add("@ColumnName", SqlDbType.NVarChar, 1024).Value = txtName.Text;
Column in your table should be able to store unicode characters, try change the type to nvarchar
and while inserting you should use N symbol before the value
let say the column name is square_root
and table is test
insert into test(square_root) values(N'√25 = 5')