sql - Manually inserting a varbinary into table -


trying insert data varbinary(max) column manually using mssql:

begin     insert [sometable]([varbinary])          values (0x255044462d312.....long varbinary(max).....ccb6ed46f9) end 

however, when it's inserted heading 0 added(0x0255...) , trailing 9 removed(...46f_) when later try use contents corrupt.

can't figure out why happening.

try explicit converting:

convert(varbinary(max), '00001340132401324...', 2) 

last parameter stays converting type. check out binary styles section here: https://docs.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-transact-sql


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -