不能叫RICHTEXT.RichtextCtrl从SQL Server 2008(在Windows 2008 Server 64)SQL、RichtextCtrl、RICHTEXT、Server

由网友(莪喂自己袋盐√)分享简介:我想使用休耕功能在我的SQL服务器:I want to use the fallowing function in my SQL-Server:CREATE FUNCTION RTF2TXT(@in varchar(8000)) RETURNS varchar(8000) AS BEGINDECLARE @ob...

我想使用休耕功能在我的SQL服务器:

I want to use the fallowing function in my SQL-Server:

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

现在的问题是,我总是从功能空。它不能创建RICHTEXT.RichtextCtrl-对象。我认为,问题是,这是在x64服务器。是否有人有一个想法如何,我可以解决这个问题?

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?

我已经做成功了:

sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
sp_configure 'Ole Automation Procedures', 1
GO
RECONFIGURE WITH OVERRIDE
GO 

启用OLE。

to enable OLE.

推荐答案

我已经previously完成使用CLR存储过程类似的事情。这是你的选择吗?

I have previously done similar things using CLR stored procedures. Is this an option for you?

阅读全文

相关推荐

最新文章