none
How to define an image in an database.mdf RRS feed

  • Question

  • Dear members

     

    I created a database for my project and everything works fine

     

    Now i want to add images to it .... but how do i define them ?

     

    I have this selected the Data Type : Image

     

    But how do i define a picture in it ?

     

    Or is there an other way to do that?

     

    Greetings

     

    Polar   (H)

    Monday, May 5, 2008 7:46 AM

All replies

  •  

    The Bitmap class has a save method, an overload of which will take a stream.  Use a memory stream, then you can get the bitmap bytes out of there to write to your DB.

     

    You reverse that process to recreate a bitmap from a byte stream from the DB.

     

    It's often better to write images to the file system and store paths in your DB, especially if it's a web app and you want to show the images later.

     

    Monday, May 5, 2008 9:01 AM
  • Well the images are imported to my resources.resx

     

    So how do i do that .... ?

     

    Monday, May 5, 2008 9:31 AM
  • Can somebody please tell me how to do this ???

    Monday, May 5, 2008 9:32 PM