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)
1
  • So... is the problem that your command line tool doesn't show BLOB contents? Commented Apr 24, 2012 at 4:22

1 Answer 1

0

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

Sign up to request clarification or add additional context in comments.

1 Comment

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();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.