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

  • 10 years ago

    Hello

    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).

Contribute

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.

“A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match” - Bill Bryson