How to write an image read from openfiledialogbox into a database ?

  • 10 years ago


    I want to write a code that gets an image read from an openfiledialogbox and then write it back to a database for future reterival. I know the openfiledialogbox.openfile method  returns a filestream but after this what should i do to get the byte array and write it into one of the parameter values of an SQL statement.

    if possible please provide me with a code snipt.

    thanks in advance.


  • 10 years ago

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter” - Eric Raymond