On SQL-Server 2005 & 8, you can use the OpenRowSet ... Bulk insert to do it; see:
http://weblogs.sqlteam.com/peterl/archive/2007/09/26/Insert-binary-data-like-images-into-SQL-Server-without-front-end.aspx
http://msdn.microsoft.com/en-us/library/ms190312.aspx
This is probably the easiest way of doing it. For exporting, you need to use BCP if you want to export it as a file; see:
http://www.sqlusa.com/bestpractices2005/importimage/
BCP can also be used to import an image, if I remember correctly. For something like an ASP page, you can also use a recordset to export your image, see:
http://www.sqlteam.com/article/images-and-sql-server
Sylvain Lafontaine, ing.
MVP - Access
Blog/web site:
http://coding-paparazzi.sylvainlafontaine.com
Independent consultant and remote programming for Access and SQL-Server (French)