title: Cannot call RICHTEXT.RichtextCtrl from SQL Server 2008 (on Windows 2008 Server x64)
body: <p>I want to use the fallowing function in my SQL-Server:</p>
  
  <pre><code>CREATE FUNCTION RTF2TXT(@in varchar(8000)) RETURNS  varchar(8000) AS 
  BEGIN
  
  DECLARE @object int
  DECLARE @hr int
  DECLARE @out varchar(8000)
  
  -- Create an object that points to the SQL Server
  EXEC @hr = sp_OACreate 'RICHTEXT.RichtextCtrl', @object OUT
  EXEC @hr = sp_OASetProperty @object, 'TextRTF', @in
  EXEC @hr = sp_OAGetProperty @object, 'Text', @out OUT
  EXEC @hr = sp_OADestroy @object
  RETURN @out
  
  END
  GO
  </code></pre>
  
  <p>The Problem is, that I always get NULL from the function. It cannot create the RICHTEXT.RichtextCtrl-Object. I think, the problem is, that this is a x64 Server. Does someone have an Idea how I can solve this?</p>
  
  <p>I have already done successfully:</p>
  
  <pre><code>sp_configure 'show advanced options', 1
  GO
  RECONFIGURE
  GO
  sp_configure 'Ole Automation Procedures', 1
  GO
  RECONFIGURE WITH OVERRIDE
  GO 
  </code></pre>
  
  <p>to enable OLE.</p>