uploading images to database

Results 1 to 2 of 2

Thread: uploading images to database

  1. #1
    Join Date
    Dec 1969

    Default uploading images to database

    I've never done this, but how do you upload an image to a sql database, using asp. I successfully accomplished uploading image from client to server, but have no idea how to go from my server to the database. i have a table with a field for the image with datatype as image.

  2. #2
    Join Date
    Dec 1969

    Default personally would not do it but....

    Importing image Data<BR>It is possible to bulk copy a data file as image data into Microsoft® SQL Server™. The command to load the data file Test.doc into the bitmap table in the pubs database using the bcp utility is:<BR><BR>bcp pubs..bitmap in test.doc -Usa -Ppassword -Sservername<BR><BR> <BR><BR>bcp prompts:<BR><BR>Enter the file storage type of field c1 [image]:<BR><BR>Enter the prefix length of field c1 [4]: 0<BR><BR>Enter length of field c1 [4096]: 5578 <BR><BR>Enter the field terminator [none]:<BR><BR> <BR><BR>In this example, the data file will be loaded into column c1 and 5578 is the length of the data file.<BR>

Posting Permissions

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