George97
George97

Reputation: 23

INSERT when used in SQL Server Management Studio = Question marks

When I insert a Hebrew string into a SQL Server database through SSMS, it appears as question marks.

The weird thing is - it only happens when the data is from SSMS. When I insert data through my app using EF, it shows up just fine.

Anyone know how to solve this? Because it doesn't appear to be a collation issue.

Upvotes: 0

Views: 1005

Answers (2)

NK0709
NK0709

Reputation: 66

i may suggest always keep note of database collation settings , you can identify the same and then read further about the same online SELECT name, collation_name FROM sys.databases;

Second thing to note is data type usually multi language system use NVARCHAR instead of VARCHAR as datatype in your insert statement specify the string as N'STRINGVALUE'

This denotes that the subsequent string is in Unicode (the N actually stands for National language character set).

Upvotes: 0

Peter Schneider
Peter Schneider

Reputation: 2929

You have to specify the string with N'your string value' when inserting into the table.

Upvotes: 1

Related Questions