-2

I want to retrieve data from database but i'm not able to retrieve image.I've taken TmagePath Datatype as nvarchar

enter image description here PFB

enter image description here

1 Answer 1

0

First you must consider that the datatype in your Database of image must be VarBinary. Than try this:

var filename = ds.Tables[0].Rows[0];
byte[] getImg = new byte[0];
getImg = (byte[])filename["WImagepath"];
MemoryStream stream = new MemoryStream(getImg);
Picwaiter.Image = Image.FromStream(stream);

Maybe usefull answer: https://stackoverflow.com/a/29589703/5603115

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

Comments

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.