• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1575
  • Last Modified:

How to save base64 to Image in ms sql

Hi!

Have a base64-encodad string (i image file)

How do i save this to a image field in ms sql ?

Please give me example
0
team2005
Asked:
team2005
1 Solution
 
lcohanDatabase AnalystCommented:
According to Microsoft research this will depend on the size of your image. If your images are < 256Kb, you should use VARBINARY(MAX). If they are above 1Mb, then you should use a FILESTREAM where the image is usually stored on the filesystem outside the database.

http://research.microsoft.com/apps/pubs/default.aspx?id=64525


Also please have a look at code sample from the link below:

http://rusanu.com/2010/12/28/download-and-upload-images-from-sql-server-with-asp-net-mvc/
0
 
team2005Author Commented:
thanks
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now