Last post Aug 13, 2018 07:02 AM by Nan Yu
Aug 11, 2018 05:37 PM|Alex9|LINK
I'm trying to store in SQL Server 2017 binary value from C# bytes array.
I have store it in BINARY field ContosoField via SqlTypes.SqlBinary parameter execution. Then, I want to get back my byte array using this: (byte)ContosoFieldValue but I see another value in result. How to correctly store byte in SQL Server storage
and get it back into byte in condition?
Aug 11, 2018 05:44 PM|mgebhard|LINK
Aug 13, 2018 07:02 AM|Nan Yu|LINK
Hi Alex ,
(byte)ContosoFieldValue but I see another value in result.
If the sizes of the column data entries vary considerably , use varbinary
. What is the problem when convert to byte array with (byte) ?