CLR, RTF to Plain Text not working.

  • Hey,

    Trying to troubleshoot an CLR/ RTF to Plain Text issue I am having.

    I have 3 instances on one SQL server. Only one of the Instances is not working. Even tried deleting everything and resetting it up.

    Here is the code I am testing with:

    USE Test_Database

    GO

    DECLARE @RTF varchar(max)

    SET @RTF = '{\rtf\ansi\ansicpg1252\uc1\deff0\deflang1033{\fonttbl{\f0 Calibri;}{\f1 Arial;}}{\colortbl\red0\green0\blue0 ;\red255\green255\blue255 ;}\viewkind4\paperw12240\paperh15840\margl1425\margr1425\margt1425\margb1425\sectd\pgwsxn12240\pghsxn15840\marglsxn1425\margrsxn1425\margtsxn1425\margbsxn1425\pard\fs21\sl276\slmult1\sa180{\f1\fs21 Test New Progress Notes - Praveen}\par}';

    SELECT dbo.clr_fn_ConvertRTF2PlainText(@RTF)

    Here is what I am getting back:

    The operation completed successfully

    Not sure what to check as the other two instances are working fine.

    I have CLR enabled in sp_Configure

    clr enabled 0 1 11

  • what error are you getting? not working is a pretty wide net to cast.

    do you get an error stating the database needs to be set to trustworthy?

    is the new server 2012/14, and the "working servers" are 2008R2 or less? 2012 and above are using the 4.0 framework, and not 2.0, and that might affect your process.

    otherwise, if the same code is working on another server, it's probably either permissions or web access.

    the service account that is running SQL server matters. compare what domain account is used to run the service on the working servers vs this server.

    does the CLR use a web service call to get the RTF conversion, or does it use windows.forms?

    if it uses Windows.Forms,did you also register Windows.Forms, and then your CLR?

    --Create assembly [System.Windows.Forms]

    CREATE ASSEMBLY [System.Windows.Forms] AUTHORIZATION dbo

    FROM 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll'

    WITH PERMISSION_SET = UNSAFE

    GO

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • This is being ran on SQL 2008 R2

    All I am getting back when I run the test script is : The operation completed successfully

    On the other instances I am getting : Test New Progress Notes - Praveen

    Yes that is the script I am using to create the assemble :

    CREATE ASSEMBLY [System.Windows.Forms] AUTHORIZATION dbo

    FROM 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Windows.Forms.dll'

    WITH PERMISSION_SET = UNSAFE

    GO

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply