Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Binary data corruption

$
0
0

Hello all!

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?

Thank you.


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>