Skip to Content.
Sympa Menu

freetds - Re: [freetds] unicode

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: christos AT zoulas.com (Christos Zoulas)
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] unicode
  • Date: Tue, 22 Jul 2008 18:17:13 -0400

On Jul 22, 4:01pm, jklowden AT freetds.org ("James K. Lowden") wrote:
-- Subject: Re: [freetds] unicode

| Jason Young (Morgon) wrote:
| > SQL Server is a pain in regards to sending UTF strings, as you'll need=20=
|
| > to prefix all of your quoted strings with capital N, for example:
| > INSERT INTO utf8_table (utf8string) VALUES (N'???')
|
| I don't see what difference the 'N' prefix makes. =20
|

The N prefix makes literal strings (not parameterized ones) UCS2.

If you declare a column nstring instead of string then you should
use N'literals' (and the other way around). If you don't the server
will make an implicit conversion for you. It is very important to
get the types right, because if you don't, then the implicit
conversion will happen on each row, prohibiting the use of indexes,
and have a severe performance impact.

christos




Archive powered by MHonArc 2.6.24.

Top of Page