Results 1 to 6 of 6

Thread: New Problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Posts
    207

    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

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Posts
    207
    Anybody have any suggestions, anybody?

  3. #3
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    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

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    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.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Posts
    207
    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

  6. #6
    Lively Member hbandarra's Avatar
    Join Date
    Aug 2002
    Location
    Lisbon, PT
    Posts
    66
    Why don't you convert the file to base 64 (XML)? The size will be huge, but it will be plain ASCII.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width