简体   繁体   中英

How to get Binary equivalent of BLOB data type in Oracle

I am using C# for front end and Oracle as a database. I have a BLOB type field in a table and is used to contain images. What I actually need to do is that whenever a record in table doesn't contain any image I want to show default pic for that particular record in front end. For that purpose can I get a binary format of that default image(without saving that image with a dummy record) after saving it temporarily in database, and then using that binary format in query to show default pic when the image doesn't exists for any record. What I am getting now is :

 SELECT EMP_IMG FROM Employee_Master WHERE EMP_CODE = 1234
 ----------------------------------------------------------
 (BLOB)

Look into byte[]; use Binary Serializer to get the byte[] version of the object. See this: C# Object Binary Serialization

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM