0

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)
SheetJS
  • 22,470
  • 12
  • 65
  • 75
Ajendra Prasad
  • 299
  • 1
  • 8
  • 22

1 Answers1

0

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

Community
  • 1
  • 1
Matt
  • 25,943
  • 66
  • 198
  • 303
  • hi @Matt I have used following line in front end but unable to get values in a single line instead in .NET values are shown indexed wise `image = (byte[])cmd.ExecuteScalar();` – Ajendra Prasad Apr 24 '12 at 04:33