Under the namespace System.Data.SqlClient, we have both SqlDataReader.GetSqlBinary
and SqlDataReader.GetSqlBytes.
Both seems to give “raw data”. If so, what’s the difference between them?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The GetSQLBytes are stored in an inside buffer for more manipulation, the Binary are just a stream that you get and use it as it is.
This two return SqlBytes and SqlBinary and by see this two types you can see the full different of them and how they store the data.
http://msdn.microsoft.com/en-us/library/system.data.sqltypes.sqlbytes.storage.aspx
http://msdn.microsoft.com/en-us/library/system.data.sqltypes.sqlbytes.aspx