Results 1 to 10 of 10

Thread: [02/03] show,add,update and delete image from database

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    81

    [02/03] show,add,update and delete image from database

    HI all. how can i show, add, update and delete image from database? many thank for your help.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] show,add,update and delete image from database

    There are examples on MSDN and there are examples posted on the forum. I know this because I've posted at least one myself. Images are assigned to, and returned from, database fields as Byte arrays. To convert between Image objects and Byte arrays you use a MemoryStream. Search the forum for memorystream and my user name and you'll find at least code one example.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    81

    Re: [02/03] show,add,update and delete image from database

    i admired you, you are so good in vb.net, you help me alot. thank for your help.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    81

    Re: [02/03] show,add,update and delete image from database

    I want to set field picture in database to null. how can i do that?

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] show,add,update and delete image from database

    Regardless of the data type of the column, you assign DBNull.Value to the field in a .NET app to set it to null.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    81

    Re: [02/03] show,add,update and delete image from database

    sir, could u tell me how to save datatable with image field to database please? could you give sample of code please?

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] show,add,update and delete image from database

    I searched MSDN for save image database and this was one of the top results.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    81

    Re: [02/03] show,add,update and delete image from database

    many thank for your help. but anyway I want to save datatable with field image to database. more please?

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    81

    Re: [02/03] show,add,update and delete image from database

    many thank for your help. but anyway I want to save datatable with field image to database. it is possible or not, more please?

  10. #10
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] show,add,update and delete image from database

    You said you wanted a code example. I provided a link to a page that provides a code example. Have you read that page? If you would like me to write the code for you myself then it will cost you AU$150/hour.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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