SQL Server Performance

character set ?

Discussion in 'General Developer Questions' started by ykchakri, Aug 21, 2003.

  1. ykchakri New Member


    I have a third party application that is using SQL database. When we enter a name with quotes (Ex: O'neal) through application it is being stored in the database with a square box instead of the quote (Run 'select char(2)' from your QA and you'll know what square box I'm talking about). But, when I list the same name through application it is displaying properly with quotes. It looks like the application converting the quote to this special character while storing and converting it back while retriving it.

    But, when I modify this name to replace the special character with quote (through QA), the application can no longer find this name, i.e. when I try to search through application for this name (O'neal) it returns zero results.

    What could be wrong ? The application vendor is blaming on the character set being used for the database. How can it be character set, When I am able to store the right character through QA ? Please suggest.
  2. gaurav_bindlish New Member

    I think there is some problem in the application itself which is handling the special characters differently. Run trace to verify waht is the data being passed from the application to SQL server.

    Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard
  3. satya Moderator

    What is the collation setup?
    Also Service pack level on SQL & OS?
    Are you dealing with UNICODE characters anywhere in the data?

    Satya SKJ
  4. vbkenya New Member

    It is possible (very possible) that your vendor was trying to skirt the issue of saving character data with embeded quotes (O'neal). The programmers must have received an error while trying to save such data and devised a replacement scheme for the single quote. The character they chose was the one least used in most legible and sensible character strings.

    IMHO, There is nothing wrong with the character set.

    If your to reverse engineer the application code, I am sure you would find the routine for replacing the quote with char(2) and vice versa.

    Go after the vendor and educate him on character sets and basic SQL.

    Nathan H.O.

Share This Page