Results 1 to 2 of 2

Thread: Image or Binary data type for uploading files?

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Image or Binary data type for uploading files?

    I am writing an ASP.NET web page.
    I want to be able to upload files to my server.
    This I can do, I have found the code for this.
    But when storing into DB I want to be able to store file sizes ranging from 1k to 10Mb.
    What SQL Server datatype do i require for this?
    I have the following table structure.

    Downloads
    • ID (Identity)
    • Filename (String * 50)
    • FileData (Image * 16)

    Is this correct?

    Woof

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Blob is what the binary type is called in MySQL.

    But with images, it's usually better to store them as files and store only the file names in the database.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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