Solved

How to save base64 to Image in ms sql

Posted on 2013-11-29
2
1,079 Views
Last Modified: 2013-12-02
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
Comment
Question by:team2005
2 Comments
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
ID: 39686022
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
 
LVL 2

Author Closing Comment

by:team2005
ID: 39689388
thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now