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

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Use SSIS to import images (jpg)

Author  Topic 

yavvie
Starting Member

46 Posts

Posted - 2009-08-03 : 05:19:48
I need to import quite a lot of screenshots in .jpg format into my table.
The destination column is varbinary(max) and I can't create a package that would import the images correctly. Any ideas how to do it?

yavvie
Starting Member

46 Posts

Posted - 2009-08-03 : 07:59:34
Got the import, just would need the package to skip those items, which have no screenshot.

I have a list of files and some of them have screenshots, so i would need to import only those that have the screenshot and ignore the other ones - is there any way other than importing a list of files in the screenshot directory first and then importing according to it? If this is the only way, how do I get a list of files in SSIS?
Go to Top of Page

mikebird
Aged Yak Warrior

529 Posts

Posted - 2009-08-03 : 12:10:57
Isn't it better to put text references to JPEG files on a hard disk in your database? I did this in ORACLE. Having bitmaps / JPEG / .png files (possibly known as something like BLOBs - binary large objects) in a database slows it all down. Use the text references to catalog things and put them in order, with a column to point to where to open the graphic, using an application, or if they're on a webpage somewhere
Go to Top of Page

yavvie
Starting Member

46 Posts

Posted - 2009-08-04 : 02:51:55
I read a couple of articles on this and they all said that if the pictures are less than 1MB it is better to store it in the DB - they don't get lost, the access rights don't mess up, so there is basically no maintenance and they are backed up which is quite important. My largest picture is 250kB so it really won't slow down.
Go to Top of Page

yavvie
Starting Member

46 Posts

Posted - 2009-08-04 : 02:52:28
by the way here is the manual on importing pictures in case anyone would ever need it :)

http://geeks.netindonesia.net/blogs/kasim.wirama/archive/2007/09/16/Importing-Image-into-SQL-Server-with-SSIS.aspx
Go to Top of Page

tomislavg
Yak Posting Veteran

51 Posts

Posted - 2010-09-06 : 04:52:42
Thanks a lot yavvie, I was looking for this one....

quote:
Originally posted by yavvie

by the way here is the manual on importing pictures in case anyone would ever need it :)

http://geeks.netindonesia.net/blogs/kasim.wirama/archive/2007/09/16/Importing-Image-into-SQL-Server-with-SSIS.aspx

Go to Top of Page
   

- Advertisement -