1 Reply Latest reply on Jul 2, 2008 8:32 AM by Newsgroup_User

    How to Upload Images from ASP to SQL Server

    Level 7
      Hello,
      I am trying to create a page that will allow users to upload photos and
      display the thubnails on a webpage. I am using SQL Server and Dreamweaver CS3
      to create .asp pages. I have attemted to use the Dreamweaver Developer Toolbox
      built in feature of "Multiple image upload and save to database wizard" I get a
      message that states, "This product was designed to work with any of the
      following server models: PHP MySQL, ASP VBScript, ColdFusion"

      I am connected to a local IIS Server and I am creating the page as ASP
      VBScript, I have verified I have a live connection to the database.

      The SQL Server database is a very simply 3 column table called "Images" with
      IDimage, image_name, and image.
      IDimage (int), image_name (nvarchar), image (image).

      Due to not beeing able to use the Developer Toolbox built in feature to
      accomplish this, I have used the form File Field to assist in creating the form
      and browse button, adding only a submit button.

      When I do try to upload the image it will allow me to browse for file, when I
      go to submit the form clears and nothing is uploaded to the database.

      Can someone assist me in how to be able to upload an image to database and
      then display the image on another page?

      Thank you


        • 1. Re: How to Upload Images from ASP to SQL Server
          Level 7
          Clay101 wrote:
          > Hello,
          > I am trying to create a page that will allow users to upload photos and
          > display the thubnails on a webpage. I am using SQL Server and Dreamweaver CS3
          > to create .asp pages. I have attemted to use the Dreamweaver Developer Toolbox
          > built in feature of "Multiple image upload and save to database wizard" I get a
          > message that states, "This product was designed to work with any of the
          > following server models: PHP MySQL, ASP VBScript, ColdFusion"
          >
          > I am connected to a local IIS Server and I am creating the page as ASP
          > VBScript, I have verified I have a live connection to the database.
          >
          > The SQL Server database is a very simply 3 column table called "Images" with
          > IDimage, image_name, and image.
          > IDimage (int), image_name (nvarchar), image (image).
          >
          > Due to not beeing able to use the Developer Toolbox built in feature to
          > accomplish this, I have used the form File Field to assist in creating the form
          > and browse button, adding only a submit button.
          >
          > When I do try to upload the image it will allow me to browse for file, when I
          > go to submit the form clears and nothing is uploaded to the database.
          >
          > Can someone assist me in how to be able to upload an image to database and
          > then display the image on another page?

          Are you sure you want to upload the image into the database? If so, are
          you sure ADDT can do that? I don't think it can, I think it just uploads
          an image to your server and stores the image filename in the database.
          Like I said in another forum, your better of asking in the ADDT forum.

          You can't just use a file field in a form to squirt it into the database
          or the filesystem, you need either a component or a script to do it for
          you. Most people will tell you not to store the image in the database
          unless you have very good reasons for doing so and know what your doing,
          as its not straight forward.

          Steve