Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Location
    The Netherlands
    Posts
    9

    Unhappy Unanswered: How to compare chinese words/signs in a sql-statement?

    I have the following line of (delphi)code:

    SQL.Add('SELECT Language_ID FROM Languages WHERE Language_Name = :language');
    ADOQuery2.Parameters.ParamByName('language').Value := TntComboBox1.Text;

    TntComboBox1.Text is an widestring with chinese marks, which it got from the same database.

    After more then an hour, i used the query analyzer and i saw, MS SQL cant compare chinese signs. (its not delphi's fault, i tested)

    Must i change some settings? And where?
    I can insert the chinese language and put in a table for example, without a problem....

    thnx,
    Erik

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Are your field types set to unicode NCHAR and NVARCHAR?

    blindman

  3. #3
    Join Date
    Sep 2003
    Location
    The Netherlands
    Posts
    9
    Yes, i have, otherwise i can't insert and select it.
    I can't do:
    SELECT something FROM table WHERE column_with_chinese_signs = 'chinese_Sign R'
    R

    only with:
    SELECT something FROM table WHERE column_with_chinese_signs = N'chinese_Sign R'

    see the N!

    but now i can't implement it in Delphi... SQL.ADD('.... = N x')
    x is a variable (e.g. a sign but can also be a word)

    I hpe i was clear

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •