好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

SqlServer数据库中调用dll文件的过程

1.首先新建一个空的解决方案,并添加一个类库,代码如下,编译并生产dll

using System; 
using System.Collections.Generic; 
using System.Data.SqlTypes; 
using System.Linq; 
using System.Text; 
namespace TEST 
{ 
  public class TestTrans 
  { 
    [Microsoft.SqlServer.Server.SqlFunction] 
    public static SqlString GenerateDecryptString(string name) 
    { 
      string decode = string.Empty; 
      decode = string.Format("HELLO WORLD {0}!", name);//DecryptString(dataXML.Value); 
      SqlString sqlValue = new SqlString(decode); 
      return sqlValue; 
    } 
  } 
}  

查看更多关于SqlServer数据库中调用dll文件的过程的详细内容...

  阅读:50次