在存储过程未创建之后创建程序集(从sql server 2005调用dll) [英] Assembly is created after that stored procedure is not creating (calling dll from sql server 2005)

查看:58
本文介绍了在存储过程未创建之后创建程序集(从sql server 2005调用dll)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨Kamal,



这是我的视觉工作室代码。



使用System;

使用System.Collections.Generic;

使用System.ComponentModel;

使用System.Data;

使用System.Drawing;

使用System.Text;

使用System.Windows.Forms;

使用System.Security.Cryptography;

使用System.IO;



public namespace encdec

{

public class encrptdecrypt

$



public static string Encrypt(string plainText,

string passPhrase,

string saltValue,

string hashAlgorithm,

int passwordIterations,

string initVector,

int keySize)

$



public static string Decrypt(string cipherText,

string passPhrase,

string saltValue,

string hashAlgorithm,

int passwordIterations,

string initVector,

int keySize)

{





}

}





这里sql-server-2005中的问题组装是在创建存储过程之后创建的。



我正在创建sp这样的





CREATE PROCEDURE usp_encdec



@plainText nvarchar(200),

@passPhrase nvarchar(200),

@saltValue nvarchar(200),

@hashAlgorithm nvarchar(200),

@passwordIterations int ,

@initVector nvarchar(200),

@keySize int



AS EXTERNAL NAME encdec。[encrypt .encrptdecrypt]。加密

GO







我收到错误<无线电通信/>


Msg 6505,Level 16,State 1,Procedure usp_encdec,Line 2

在程序集'encdec中找不到类型'encrypt.encrptdecrypt' '

Hi Kamal,

this is my visual studio code.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;
using System.IO;

public namespace encdec
{
public class encrptdecrypt
{

public static string Encrypt(string plainText,
string passPhrase,
string saltValue,
string hashAlgorithm,
int passwordIterations,
string initVector,
int keySize)
{

public static string Decrypt(string cipherText,
string passPhrase,
string saltValue,
string hashAlgorithm,
int passwordIterations,
string initVector,
int keySize)
{


}
}


Here problem in sql-server-2005 Assembly is creating after that stored procedure is not creating.

I am creating sp like this


CREATE PROCEDURE usp_encdec

@plainText nvarchar(200),
@passPhrase nvarchar(200),
@saltValue nvarchar(200),
@hashAlgorithm nvarchar(200),
@passwordIterations int,
@initVector nvarchar(200),
@keySize int

AS EXTERNAL NAME encdec.[encrypt.encrptdecrypt].Encrypt
GO



I am getting error

"Msg 6505, Level 16, State 1, Procedure usp_encdec, Line 2
Could not find Type 'encrypt.encrptdecrypt' in assembly 'encdec'"

推荐答案

由程序集名称和完整类名(包括命名空间)组成的类的完全限定名称...根据您的代码,它应该是

The fully qualified name of class made out of assembly name and full class name (including namespace)...According to your code it should be
[assembly-name].encdec.encrptdecrypt.[method-name]


这篇关于在存储过程未创建之后创建程序集(从sql server 2005调用dll)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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