none
Moving VB string (UNICODE) to SQL char or varchar (ASCII) RRS feed

  • Question

  • I was wondering if someone can explain what sort of hit in performance one can expect when moving strings from VB .NET (UNICODE) to SQL 2005 char or varchar (ASCII)? There must be some sort of coercion going on behind the scenes.

    Friday, October 19, 2007 1:37 PM

Answers

  • There is, but you won't notice it.  Encoding text is computationally inexpensive relative to everything else that happens when you ship data around.

     

    A much greater problem is likely to be that the transformation isn't lossless.  Any character outside the U+0000 to U+007F range will get written to your database as a ?.

    Monday, October 22, 2007 6:42 PM

All replies

  • There is, but you won't notice it.  Encoding text is computationally inexpensive relative to everything else that happens when you ship data around.

     

    A much greater problem is likely to be that the transformation isn't lossless.  Any character outside the U+0000 to U+007F range will get written to your database as a ?.

    Monday, October 22, 2007 6:42 PM
  • You will probably want to take a look at nchar and nvarchar if you are using unicode characters.

     

    Monday, October 22, 2007 7:04 PM