Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Oct 2005
    Posts
    140
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Output Pictures from Database

    How do i output pictures from my sql database using asp?
    the rest of my data are being able to be displayed except the pictures.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    Are you using Response.BinaryWrite instead of Response.Write?

  • #3
    Regular Coder
    Join Date
    Oct 2005
    Posts
    140
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, i am using response.binarywrite as found from some websites. My datatype is varchar,that is correct right? And not image.?

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    The datatype should be BLOB

  • #5
    Regular Coder
    Join Date
    Oct 2005
    Posts
    140
    Thanks
    0
    Thanked 0 Times in 0 Posts
    how am i supposed to enter the image path in my database?

    is it supposed to be this way - "images/cake.jpg" with datatype varchar?

  • #6
    Regular Coder
    Join Date
    Oct 2005
    Posts
    140
    Thanks
    0
    Thanked 0 Times in 0 Posts
    im using ms sql, which doesnt have datatype blob .. it only has image varchar... and so on.

  • #7
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    I thought you were saving the image itself in the db, not the path.

  • #8
    Regular Coder
    Join Date
    Oct 2005
    Posts
    140
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it's ok i got it already.I was really dumb - i was missing out the tag <img src> .. instead my tag looked just like this only - <%=RS.Fields("Images")%> and the rest similarly <%=RS.Fields("Name")%> - i forgot to add in <img src=">in front of the rs.fields("image") .. lol


  •  

    Posting Permissions

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