Solved

How to save base64 to Image in ms sql

Posted on 2013-11-29
2
1,141 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

777 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