title: Save image to Sql Server image to image field using C# and Subsonic
body: <p>In an ASP.NET app (using framework 2.0), and the ORM for this application is Subsonic 2.2, which I'm working with for the first time.  </p>
  
  <p>I have an image which I've retrieved from a URL, and I have an HttpWebresponse object, which I've converted to an image, like this:</p>
  
  <pre><code>    string uri = ...;
      HttpWebRequest lxRequest = (HttpWebRequest) WebRequest.Create(uri);
      HttpWebResponse lxResponse = (HttpWebResponse) lxRequest.GetResponse();
      System.Drawing.Image image = System.Drawing.Image.FromStream(lxResponse.GetResponseStream());
  </code></pre>
  
  <p>In Sql Server, I've created an Image column (could be any other binary format, that's not a problem), and I'd like to write my image into it. I'd also like to know how to read from the column, so as to test that the image has been correctly saved.</p>
  
  <p>Any help appreciated. Thanks.</p>