November 4, 2002 at 6:34 pm
Is it possible to import a single binary/text file into an image field, and more importantly export it back again?
I'm considering embedding MSWord docs in image fields for a simple doc management system.
November 5, 2002 at 6:18 pm
This is from another site
quote:
First of all, if possible, try not to stored images and other binary files in the SQL Server tables, as they slow things down. Instead, store a link (file path) to the file in the tables and let your applications directly access the files. But if you must store these files within SQL Server, use the text/ntext or image datatype columns and consider the following options:SQL Server 7.0 and 2000 come with a utility called textcopy.exe. You can locate this file in the Binn folder under your SQL Server installation folder. Run this file from command prompt, and it will prompt you for required input
Use the GetChunk and AppendChunk methods of ADO Field object. MSDN has examples
Use the ADO Stream object
Use the Bulk Insert Image utility (BII) that ships with SQL Server 2000 (Can be found at \Program Files\Microsoft SQL
Server\80\Tools\Devtools\Samples\Utils)
November 6, 2002 at 11:55 am
textcopy works very well.
If you are going to store documents, consider storing them on a seperate filegroup, which aids backup and recovery.
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
December 3, 2002 at 9:17 pm
quote:
Is it possible to import a single binary/text file into an image field, and more importantly export it back again?I'm considering embedding MSWord docs in image fields for a simple doc management system.
yes but why? The operating system file system is already better at managing these files than anything you can come up with. Consider designing your system to work with the OS instead of internalizing the files. You'll be lots better off in the long run. if you are familiar with the product eroom, it stores files (and lots of them) on the server and manages them via the data base in their native format.
December 4, 2002 at 5:00 am
quote:
quote:
Is it possible to import a single binary/text file into an image field, and more importantly export it back again?I'm considering embedding MSWord docs in image fields for a simple doc management system.
yes but why? The operating system file system is already better at managing these files than anything you can come up with. Consider designing your system to work with the OS instead of internalizing the files. You'll be lots better off in the long run. if you are familiar with the product eroom, it stores files (and lots of them) on the server and manages them via the data base in their native format.
I always believed the OS file system was greatly better managed that SQL when comes to images. Even MS states not to store in the DB but instead on the local drive. But I keep hearing that MS plans to base the OS file system on a hybrid of the storage system in SQL in future versions. So, if that is true and they say don't store binaries ina SQL table then which side of the house is smoking crack?
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply