• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

Read non-english text for SQL Server using ADO

The problem we're facing is text being automatically translated when retrieved from the database.

I.e., non-english characters are returned as question marks ("???").

We've looked around and found that ADO has a flag called "Auto Translate" which determines whether or not to automatically translate the text. The problem is that although this flag works great with string typed fields, it has no effect on memo typed fields. That is to say that memo typed fields are being translated regardless of the flag.

We've run two SQL statements, as follows:

- "SELECT MY_MEMO_FIELD FROM MY_TABLE" - Returns '???' instead of non-english characters.

- "SELECT SUBSTRING(MY_MEMO_FIELD, 1, 1000) FROM MY_TABLE" - Returns the correct characters.

Is there some solution for the problem?

0
Slavak
Asked:
Slavak
  • 2
1 Solution
 
Wim ten BrinkSelf-employed developerCommented:
Yes, use widestrings... (Unicode)
0
 
SlavakAuthor Commented:
where?
0
 
bpanaCommented:
all the controls in your application should support WideString and you have to use WideString in place of String type.

there is a free set of unicode controls I used which are prety nice:
http://tnt.ccci.org/delphi_unicode_controls/
0
 
SlavakAuthor Commented:
the problem is not delphi gui controls, problem is that ADO attempts to translate the text and fails.

is it possible to get the text from memo field without translation?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now