Image

  • How can I store an imgage(.Jpg or .bmp file)in my sql server table.Which datatype i should use and how can store it in my database table.

    Thanks in advance.

  • I used the image data type for my simple web page.

  • If you use a binary large object (BLOB) you can stream the images in/out as you please.

    It all depends on the size of your images.. e.t.c

    But that gets you on to the old chesnut if is it better to store them in the database or on the filesystem????????

    This has been discussed many times before.....

  • quote:


    If you use a binary large object (BLOB) you can stream the images in/out as you please.

    It all depends on the size of your images.. e.t.c

    But that gets you on to the old chesnut if is it better to store them in the database or on the filesystem????????

    This has been discussed many times before.....


    that's right!

    It's best to get a solid understanding what storing binary data in tables means and implies.

    The best source I've come around on this topic can be read here:

    http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/sql/reskit/sql2000/part3/c1161.asp

    Cheers,

    Frank

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Don't do it ! You will regret it due to space concerns and no ability to compare the image type.

    Put the image in a bcked up directory and dtore the path to the image in the database.

  • hey whats dtore, can u please explain me in detail.

    Thanks

  • I am guessing but dtore = store.

    I used to think storing the path was the was to go, but with what I have been reading about the future of windows and SQL server I would store the BLOBs in the DB now.

    I do sugest creating a seperate file group for the blobs.

  • I've made good experience storing BLOB's in a total separate db, which stores nothing else.

    Cheers,

    Frank

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply