Solved

How to save base64 to Image in ms sql

Posted on 2013-11-29
2
1,219 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
T-SQL Import data in Microsoft SQL Server Management Studio using INSERT 3 24
Regarding Disk IO 3 49
Need help with another query 10 39
SQL query 7 18
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

726 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