dim con as sqlconnection = new sqlcon("put your connection string here")
dim com as sqlcommand=new sqlcommand("select image from tablename where id='1'")
dim image as image
con.open
image=image.frommemorystream(io.new memorystream(ctype(com.executescalar,byte())))
con.close
image.save("c:\)