调用具有表值参数作为参数之一的存储过程时,我收到以下错误
EXECUTE
对象'ValidationErrors' 的权限被拒绝
ValidationErrors是使用以下语句创建的TVP:
CREATE TYPE [dbo].[ValidationErrors] AS TABLE(
[ErrorMessage] [varchar](255) NOT NULL
)
Run Code Online (Sandbox Code Playgroud)
执行存储过程的用户对存储过程具有执行权限.但是,我仍然得到上述错误.有任何想法吗?
示例代码:
CspParameters cspParameters = new CspParameters();
cspParameters.ProviderType = 1; // PROV_RSA_FULL
// Create the crypto service provider, generating a new
// key.
mRsaCSP = new RSACryptoServiceProvider(mDefaultKeyLength, cspParameters);
mRsaCSP.PersistKeyInCsp = true;
RSAParameters privateKey = mRsaCSP.ExportParameters(true);
byte[] rsaBytes = mRsaCSP.ExportCspBlob(true);
try
{
X509Certificate2 cert = new X509Certificate2(rsaBytes);
mKeyDataPfx = Convert.ToBase64String(cert.Export(X509ContentType.Pkcs12, password));
}
catch (Exception ce)
{
string error = ce.Message;
}
Run Code Online (Sandbox Code Playgroud)