Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

Dominican Republic
2 Posts

Posted - 04/21/2013 :  22:44:30  Show Profile  Reply with Quote
What is the type of values I have to use to tell the database to store pics?

Aged Yak Warrior

549 Posts

Posted - 04/21/2013 :  22:53:41  Show Profile  Reply with Quote
Please refer to:
Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 04/22/2013 :  00:51:10  Show Profile  Reply with Quote
you should be using varbinary. there was a separate datatype called image before but thats deprecated so varbinary(max) is the way to go.

you can use OPENROWSET ..BULK to insert an image in db.

SQL Server MVP
Go to Top of Page

Starting Member

12 Posts

Posted - 12/09/2013 :  21:44:21  Show Profile  Reply with Quote
Hi, morietrenatus.
I have ever tried to
store pics with the help of the following code:

using System.IO;
using System.Drawing.Printing;
using Yiigo.Imaging;
using Yiigo.Imaging.Processing;
using Yiigo.Imaging.Loading;

// Get or create an image to save later.
YiigoImage image = GenerateImage()

Save image to JPG format.
Image.Save("jpgimage.jpg", new JpegEncoder(), null);

/*Save image to PNG format.
Image.Save("pngimage.png", new PngEncoder(), null);

Save image to gif format.
Image.Save("gifimage.gif", new GifEncoder(), null);

Or you can also google it and select a fine imaging tool whose way of processing is simple and fast to help you with the related work. It will be better if it is totally manual and can be customized by users according to our own favors. Remember to check its free trial package first if possible. I hope you success. Good luck.

Best regards,

Edited by - arronlee on 12/10/2013 21:34:28
Go to Top of Page

Starting Member

4 Posts

Posted - 12/11/2013 :  22:09:28  Show Profile  Reply with Quote
Have you thought of storing the image on the file system and saving the path to it as text?
This will perform very well for you.

Performance Tuning, Server Healthcheck & Monitoring Software:
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000