I'm trying to read image from firebird with c#, and save it to file system. I can read from table and save. but image can not be viewed. I tried many piece of code on net.but result is same :( Can any one help me please?
+1
A:
How are you retrieving the code form Firebird? If you are getting the data and casting it to a byte[] try:
byte [] blob = row["image"];
// create a file FileStream to write the data
FileStream fs = new FileStream("image.jpg", FileMode.Create);
fs.Write(blob,0,blob.Length);
fs.Close();
The above code should do the trick.
PS: I have made lots of assumption in the code, but you can get the idea.
mandel
2009-02-26 13:45:16