Answer the question
In order to leave comments, you need to log in
Why isn't Cyrillic written in the MS-SQL text field?
There is a field in MS-SQL, windows-1251 encoding, text type. Through activeRecord, the value of the "address" field (Cyrillic) is added, the following query is formed:
INSERT INTO [Orders] [Address]) VALUES (0xc8ecff20d4e0ece8ebe8ff20cef2f7e5f1f2e2ee)
An error appears: "Operand type conflict: varbinary is incompatible with text". On the varchar type, everything is fine. What to do?
Answer the question
In order to leave comments, you need to log in
use the correct types to store data. if the address field is only 30 characters at a glance, why do it text? The text, contrary to the name, is intended for storing a large amount of data.
Probably not enough quotes.
But I would not use the TEXT type if I were you - it will be abandoned in new versions. Use nvarchar(max)
The error appears: "Operand type conflict: varbinary is incompatible with text". On the varchar type, everything is fine. What to do?
Use nvarchar(max)It makes more sense to use the varbinary(50) type, or whatever length you need.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question