March 4, 2010 at 9:34 am
Currently we have a DLL written that recieves text. This function looks at the text to see if it starts with the RTF tag and if so creates a RichTextBox, assigns the passed in text to the RichTextBox and returns the text value.
Problem is we are recieving an error.
We feel it's because we are using the RichTextBox which uses the System.Windows.Form.
So does anyone know of any 3rd party RTF to Text libraries that are not windows forms? A .net dll that we can use.
Joe
March 8, 2010 at 11:53 pm
You are receiving that error because that library is not safe to use within the SQL Server hosted environment.
Perform the conversion outside SQL Server.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
March 9, 2010 at 4:48 am
It had to be unsafe because of the System.Windows.Forms and we can't do the conversion outside of SQL Server.
Yesterday I spent the day writing our own RTFtoText utility in C# that was not dependent upon System.Windows.Forms
The dll was also changed from UNSAFE to SAFE.
I used regular Expressions and was able to remove the RTF tags and be return with the Text.
Joe
March 9, 2010 at 5:58 am
joepacelli (3/9/2010)
It had to be unsafe because of the System.Windows.Forms
My point was that System.Windows.Forms is never safe for use in SQL Server. You can force it to, with UNSAFE and some trickery, but it is an extremely bad idea, as no doubt you realized.
joepacelli (3/9/2010)
and we can't do the conversion outside of SQL Server.
I presume you mean 'we choose not to'...?
joepacelli (3/9/2010)
Yesterday I spent the day writing our own RTFtoText utility in C# that was not dependent upon System.Windows.Forms
I would have downloaded one of the free ones on the Internet 😉
SQL Server is still the wrong place to do bulk data conversion, even using CLR integration, IMO.
Paul
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
March 10, 2010 at 9:29 pm
Below link can be helpful to you..
March 10, 2010 at 11:20 pm
Kuldip Rindani (3/10/2010)
Below link can be helpful to you..
I doubt it, since the problem is already solved. It might help someone else though, so thanks anyway.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply