0

I have a database in SQL Server.

I have a table Demo where I inserted text in Russian into a column of type Nvarchar

Now I want to read the Russian text into my Delphi app where I want to store it into a string.

Do I have to set any Charset property of ADO query etc. ?

Any other ideas would be welcome.

Thanks in advance

Lev Khomich
  • 2,247
  • 14
  • 18
CyprUS
  • 4,159
  • 9
  • 48
  • 93

1 Answers1

0

Since there was no answers to this one , i will answer it myself . Using SetThreadLocale(<language id>) i was able to set the thread's language id to 1033 ( for english) . Since my DB was set to 1033 id , the displayed text is now correctly displayed . I hope it helps others.

To correctly enter Unicode characters to database , use the prefix N for columns where unicode strings are to be entered. For more details , have a look here

CyprUS
  • 4,159
  • 9
  • 48
  • 93
  • Will there be no other language than Russian in your DB? `NVarchar` is Unicode. you should read and write `WideString` to and from the DB. It's hard work with D7, I know. but ADO if fully capable to work with Unicode, and for the DB aware controls you could use Tnt Controls for example. – kobik May 03 '12 at 16:32