dbTalk Databases Forums  

Exporting BLOBs to .jpg files

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Exporting BLOBs to .jpg files in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bsanders
 
Posts: n/a

Default Exporting BLOBs to .jpg files - 02-16-2005 , 05:59 PM






I have been tasked with creating an export from a mssql db which will contain
data and in addition have pictures filed in a directory. Is there a way in
tsql to convert these image data types to jpg files?

Reply With Quote
  #2  
Old   
Jim Young
 
Posts: n/a

Default Re: Exporting BLOBs to .jpg files - 02-16-2005 , 11:56 PM






Assuming that the data that is stored in the database is the raw data for
the jpg image, you will need to write an application (or perhaps an extended
stored procedure) that will take the data from a query and write it out to a
file system as a jpg file. Actually it is not really that hard to do in an
application. You can write a stored procedure returns your blob data in a
result set and then assign that data to the appropriate datatype in your
application. But, to be honest, I think you would be better off to store the
data externally in a file system and then use the database to store the path
to the file. Your queries would be faster and your database size would be
much smaller and manageble. This lets the file system do what it does best
and the database server to what it does best.

Jim

"bsanders" <bsanders (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have been tasked with creating an export from a mssql db which will
contain
data and in addition have pictures filed in a directory. Is there a way
in
tsql to convert these image data types to jpg files?



Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Exporting BLOBs to .jpg files - 02-17-2005 , 12:27 AM



Could you do something like this?

Write File Transformation
(http://www.sqldts.com/default.aspx?294)



"bsanders" <bsanders (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have been tasked with creating an export from a mssql db which will
contain
data and in addition have pictures filed in a directory. Is there a way
in
tsql to convert these image data types to jpg files?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.