不能叫RICHTEXT.RichtextCtrl从SQL Server 2008(在Windows 2008 Server 64) [英] Cannot call RICHTEXT.RichtextCtrl from SQL Server 2008 (on Windows 2008 Server x64)

查看:227
本文介绍了不能叫RICHTEXT.RichtextCtrl从SQL Server 2008(在Windows 2008 Server 64)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用休耕功能在我的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?

这篇关于不能叫RICHTEXT.RichtextCtrl从SQL Server 2008(在Windows 2008 Server 64)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆