12. Understanding .NET Data Provider Connectivity : IngresDataReader Object--Retrieve Data from the Database : GetBytes Method--Obtain BLOB Values from a Database
 
Share this page                  
GetBytes Method--Obtain BLOB Values from a Database
When you access the data in the BLOB field, use the GetBytes typed accessor of the DataReader, which fills a byte array with the binary data. Specify a buffer size of data to be returned and a starting location for the first byte read from the returned data. GetBytes will return a long value that represents the number of bytes returned. If you pass a null byte array to GetBytes, the long value returned is the total number of bytes in the BLOB. Optionally, specify an index in the byte array as a start position for the data being read.