Re: How to store picture (*.jpg, *.bmp, *.gif) into sql database ?

Discussion in 'ASP .Net' started by Curt_C [MVP], Jul 27, 2004.

  1. Curt_C [MVP]

    Curt_C [MVP] Guest

    use the Image datatype, BUT... if you can, try just storing them on the
    FileSystem and storing a path/name in the DB. Better/easier to deal with.

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "Daniel" <> wrote in message
    news:...
    > Does anyone know how to solve the above solution using ASP.net language.
    >
    > Thanks in advance.
     
    Curt_C [MVP], Jul 27, 2004
    #1
    1. Advertising

  2. I always wondered about this. I have tried storeing images in a database
    and I think is kool since the data can be managed a whole lot easier.
    Storeing the path in the DB is ok but you have to manage the data in the DB
    and on the filesystem. Does anyone else have an opinion on this?

    Tampa .NET Koder



    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    news:e%...
    > use the Image datatype, BUT... if you can, try just storing them on the
    > FileSystem and storing a path/name in the DB. Better/easier to deal with.
    >
    > --
    > Curt Christianson
    > Owner/Lead Developer, DF-Software
    > Site: http://www.Darkfalz.com
    > Blog: http://blog.Darkfalz.com
    >
    >
    > "Daniel" <> wrote in message
    > news:...
    > > Does anyone know how to solve the above solution using ASP.net language.
    > >
    > > Thanks in advance.

    >
    >
     
    Tampa .NET Koder, Jul 27, 2004
    #2
    1. Advertising

  3. Curt_C [MVP]

    Shan Plourde Guest

    Re: How to store picture (*.jpg, *.bmp, *.gif) into sql database?

    I'm for storing files on the file system. Some of my cons are below.
    There are many others and pros for doing what you're doing, and these
    items could be argued, but these are my 2 cents on why I would not store
    files in a database. Others would definitely have different opinions,
    I'm not sure what people with clustered .NET servers would recommend for
    example. Perhaps their arguments would weigh in favour of what you're
    doing. My perspective is from the simple .NET server and DB server
    architecture.

    1. No need for large files to be processed through .NET process space.
    If you store files in your database, the files must be streamed through
    the .NET framework before being returned to clients - definitely unnecessary
    2. More network bandwidth consumed between your .NET application server
    and DB server if they are separate machines; greater network scalability
    3. Limited indexing for searching purposes versus externalized files
    with external file indexing / searching tools
    4. No capability to manually examine a file without programmatically
    retrieving the file from the database first - can be an inconvenience
    when it is necessary to do so, perhaps for support and maintenance or
    debugging purposes
    5. More database expertise required to effectively partition database to
    support files versus simply storing on filesystem - perhaps could impact
    performance of your database if not done well

    Shan

    Tampa .NET Koder wrote:

    >I always wondered about this. I have tried storeing images in a database
    >and I think is kool since the data can be managed a whole lot easier.
    >Storeing the path in the DB is ok but you have to manage the data in the DB
    >and on the filesystem. Does anyone else have an opinion on this?
    >
    >Tampa .NET Koder
    >
    >
    >
    >"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    >news:e%...
    >
    >
    >>use the Image datatype, BUT... if you can, try just storing them on the
    >>FileSystem and storing a path/name in the DB. Better/easier to deal with.
    >>
    >>--
    >>Curt Christianson
    >>Owner/Lead Developer, DF-Software
    >>Site: http://www.Darkfalz.com
    >>Blog: http://blog.Darkfalz.com
    >>
    >>
    >>"Daniel" <> wrote in message
    >>news:...
    >>
    >>
    >>>Does anyone know how to solve the above solution using ASP.net language.
    >>>
    >>>Thanks in advance.
    >>>
    >>>

    >>
    >>

    >
    >
    >
    >
     
    Shan Plourde, Jul 27, 2004
    #3
  4. Curt_C [MVP]

    jharr100

    Joined:
    Aug 14, 2009
    Messages:
    1
    Using the Visual Studio 2008 Design to add pictures to sql ce database

    I am using visual studio 2008 to create a data source and I am adding the tables by using the design part - not actually writing out sql statements in visual studio. I am using C# to write the code for a mobile device app. When I add a column named Image of Image type or varbinary type - I do not know how to add the image to the database. Do I use the image file name or what do I use???
     
    jharr100, Aug 14, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Richard
    Replies:
    3
    Views:
    4,162
    velocity4anil
    Sep 19, 2007
  2. Tampa .NET Koder
    Replies:
    0
    Views:
    521
    Tampa .NET Koder
    Jul 27, 2004
  3. b83503104
    Replies:
    2
    Views:
    334
    Rolf Magnus
    Nov 28, 2003
  4. BM

    JPG, PNG, GIF -> BMP

    BM, Sep 24, 2003, in forum: C Programming
    Replies:
    2
    Views:
    401
    Paul D. Boyle
    Sep 24, 2003
  5. b83503104
    Replies:
    2
    Views:
    551
    Rolf Magnus
    Nov 28, 2003
Loading...

Share This Page