Blob field size?

john_paul

New member
Joined
Mar 24, 2016
Messages
1
Programming Experience
Beginner
If the MySQL database does not contain a column for the blob file size how do you retrieve a pdf file from a blob field and then save it to disk?


Thanks


John
 
Assuming that the file is not too large, you get the data as a Byte array and then call File.WriteAllBytes. If the file is too large for that then you may be able to stream the data and then read and write in in chunks. That is certainly possible with SQL Server but I'm not sure whether it is with MySQL or not.
 
Back
Top