惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
有赞技术团队
有赞技术团队
Hugging Face - Blog
Hugging Face - Blog
罗磊的独立博客
S
SegmentFault 最新的问题
D
Docker
博客园 - 司徒正美
雷峰网
雷峰网
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - Franky
月光博客
月光博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
MongoDB | Blog
MongoDB | Blog

博客园 - 心悦

今天是父亲节,下面是有关父亲的电影,连续剧. 看微电影<疯狂的乞丐>有感。 textarea的滚动条色 ETester SQL Pretty Printer 可以让你少奋斗十年的工作经验(转) 小偷公司 SqlDbxPro 解决掉S60系统出错问题 GLDEF_C, LOCAL_C, GLREF_C 的含义(转) WINDOWS 2003下HTTP 500 - 内部服务器错误解决 进度与质量的关系 SQL语句实现结果集合的拼接 PL/SQL Developer SQL Delta数据库对比工具 IE个性化 - 心悦 - 博客园 XSLT语法 - 心悦 - 博客园 恒心应该怎样做 找合适自己的工作,而非最好的工作
转繁体 sp_oacreate
心悦 · 2008-04-02 · via 博客园 - 心悦

use   master  
  go  
  create   function   DCMSconvert   (@sInText   Nvarchar(4000),@TransType   int)  
  --注释:1、@sInText     表示要转换的字符串       2、@TransType           表示转换类型   0转繁体   1-转简体      
  RETURNS   Nvarchar(4000)  
  AS  
  BEGIN  
      DECLARE     @sOutText   Nvarchar(4000)  
   
      DECLARE   @Document   int  
      EXEC   sp_OACreate   'Word.Document',   @Document   OUT  
      EXEC   sp_OASetProperty   @Document,   'Application.Selection.Text',   @sInText  
      EXEC   sp_OAMethod   @Document,'Application.Selection.Range.TCSCConverter',NULL,@TransType,1,1  
      EXEC   sp_OAGetProperty   @Document,   'Application.Selection.Text',   @sOutText   OUT  
      EXEC   sp_OADestroy   @Document  
      EXEC   sp_OAStop  
      RETURN(@sOutText)  
  END  
   
  GO  
   
   
  --调用例程一、  
  use   Northwind  
  select   master.dbo.DCMSconvert('首页是交流思想的地方',0) 

posted on 2008-04-02 22:01  心悦  阅读(806)  评论()    收藏  举报