-
New Problem
Ok,
I seem to have the rest of my problems straightened out.
Now it just seems to be this one last thing I need to do. I can save a text and stuff to my SQL server but I am seeming to have a problem saving a picture up there. Here are my first couple of problems.
1. I can't seem to find a reliable way of converting my image to a stream then to a byte array.
2. I can't seem to find a way to get my byte array back out of my dataset to recreate the picture.
One other thing please don't recomend that I write the picture to the file system and then store a pointer, this simply is practical as all the data needs to be stored in the database.
If anyone could help in these two problem I would greatly appreciate it.
Thanks
-
Anybody have any suggestions, anybody?
-
why dont you save the picture to a directory on the server
and SQL server just store the path?
its simple, it works, and its MUCH more effecient for speed
-
I agree with Kovan... If you are storing the pictures on the same server as the SQL DB sits, they should be secure if that is what you are worried about. Storing blob data like images in SQL server works, but I have always heard that it kills performance bad.
After saying that, here you go with some links that will help you do it:
http://www.aspalliance.com/das/insertimage.aspx
http://www.aspalliance.com/das/readimage.aspx
Have fun.
-
The images need to be stored in the database for "compatiblity reason". The program I am working on will need to read and modify a database (every thing is done except for the image part) that was written for a third party application. It is an "in-house" project that I need to finish.
Jeremy
-
Why don't you convert the file to base 64 (XML)? The size will be huge, but it will be plain ASCII.