title: inserting and get image from sql server database
body: <p>I am trying to insert an image into a table which has a column with type (image). Here is what I tried:</p>
  
  <pre><code>INSERT INTO tblDDPhotos(ID, img)
  VALUES (1, SELECT * FROM
  OPENROWSET(BULK 'blob:http%3A//localhost%3A64527/81655427-3653-427d-92bf-254cd2a2e647', SINGLE_BLOB) as imagefile)`
  </code></pre>
  
  <p>I wanted to know,</p>
  
  <ol>
  <li>How do we insert the image from blob.</li>
  <li>How can we access and retrieve the image. </li>
  <li>What are the disadvantage of storing an image in the DB as over to saving the image in a folder in the server. </li>
  </ol>