Showing posts with label varbinary. Show all posts
Showing posts with label varbinary. Show all posts

Sunday, March 25, 2012

binary varbinary question

What is the documented and known behavior of inserting hex constants into a
binary/varbinary column from a client to a server which have different code
pages? Will any code page / character set conversion take place?
eg: insert into t1 values ('AA') or insert into t1 values(x'AA')
Thanks
AakashYou can specify a binary (hex) constant as 0x followed by the character
representation of the hex string. These are not enclosed in quotes.
For example:

INSERT INTO t1 VALUES(0xAA)

This is documented in the SQL Server 2000 Books Online
<tsqlref.chm::/ts_ca-co_1n1v.htm>. Since the value is not a character
value, no character conversion occurs.

--
Hope this helps.

Dan Guzman
SQL Server MVP

--------
SQL FAQ links (courtesy Neil Pike):

http://www.ntfaq.com/Articles/Index...epartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--------

"Aakash Bordia" <a_bordia@.hotmail.com> wrote in message
news:bf4j62$688$1@.hanover.torolab.ibm.com...
> What is the documented and known behavior of inserting hex constants
into a
> binary/varbinary column from a client to a server which have different
code
> pages? Will any code page / character set conversion take place?
> eg: insert into t1 values ('AA') or insert into t1 values(x'AA')
> Thanks
> Aakash

Binary Problem

Hy friends!

I'm new in WebApplications that have SQL SERVER DB.

My problem is that...

In the DataBase I have a table with varbinary column and in the program I want save in this column a value of binary[] variable! How I can make it?

Another question... If I want select (by a query in the application) the value of the binary column, where I store it? because if I want select an integer value I take this in a int variable, and if I want select an string value from a DataBase I take this in a string variable..but How I can make it with binary column?

Thanks in advance!!

The following Scott Mitchell tutorial should help you

http://aspnet.4guysfromrolla.com/articles/081705-1.2.aspx

sql