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

  • 11 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.


  • 11 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.

“My definition of an expert in any field is a person who knows enough about what's really going on to be scared.” - P. J. Plauger