Unix Technical Forum

host variables and code page conversion

This is a discussion on host variables and code page conversion within the SQL Server forums, part of the Microsoft SQL Server category; --> Hello, Does anybody know what is the documented and known behavior of inserting/updating binary columns using host variables from ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 07:31 PM
Aakash Bordia
 
Posts: n/a
Default host variables and code page conversion

Hello,
Does anybody know what is the documented and known behavior of
inserting/updating binary columns using host variables from a client to a
server which have different code pages? Will any code page / character set
conversion take place? I am particulary interested in insert/update from
subqueries.

eg:
insert into t1(binarycol) select :HV1 from t2
versus
insert into t1(binarycol) select :HV1||charcol from t2

update t1 set bytecol=:HV1
versus
update t1 set bytecol=:HV1||'abc'

insert into t1 (bytecol) values(:HV1)
versus
insert into t1 (bytecol) values(:HV1||'abc')

Is the conversion dependent on the context?
Thanks
Aakash



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 07:32 PM
Erland Sommarskog
 
Posts: n/a
Default Re: host variables and code page conversion

Aakash Bordia (a_bordia@hotmail.com) writes:
> Does anybody know what is the documented and known behavior of
> inserting/updating binary columns using host variables from a client to a
> server which have different code pages? Will any code page / character set
> conversion take place? I am particulary interested in insert/update from
> subqueries.


In SQL Server there is no implicit conversion from character to
binary.

You seem to be using some form of embedded SQL, and this product
might supply such conversion. In this case I would expect the conversion
to binary happen on the client side, and thus the binary value will
reflect the code page on the client.

But this is speculation on my part. You are probably off testing to
see what happens.


--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:40 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com