Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CLR to convert RTF data to image

11 views
Skip to first unread message

MichaelH

unread,
Dec 24, 2009, 2:51:43 PM12/24/09
to
Is it possible using CLR to convert RTF data in a SQL database to
image?

Thanks in advance.

Erland Sommarskog

unread,
Dec 24, 2009, 3:35:31 PM12/24/09
to
MichaelH (bmig...@gmail.com) writes:
> Is it possible using CLR to convert RTF data in a SQL database to
> image?

Hm, yes, but I'm not really sure what you are up to.

To start with, the image data type is deprecated, and you are much better
off using varbinary(MAX).

Second, if you want to store an RTF document in a varbinary(MAX) column,
you don't really have to convert it, just store the bytes. I have a very
simple example on http://www.sommarskog.se/blobload.txt.


--
Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

0 new messages