By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

Column level encryption error for numeric and datetime datatypes

P: 1
Hi Pinal Dave,

I have 2 columns in one table, its datatype are numeric(18,0),datetime when i am going to encrypt these column i’m adding columns with same datatype it is giving error when the time of updation and I am tried with varbinary(256) also it is giving the same error.
The error is
” Argument data type numeric is invalid for argument 2 of EncryptByKey function “.
I am using SQL Server 2008r2 Enterprises edition . Please give me the solution for this how to encrypt the columns which i have mentioned. Is encryption will not work on these datatypes?

Thanks in advance……

Srinivasa Babu Doosa
Sep 28 '13 #1
Share this Question
Share on Google+
2 Replies


Rabbit
Expert Mod 10K+
P: 12,430
That sounds like a pretty clear error message. You can't pass a numeric to encrypt.
Sep 28 '13 #2

ck9663
Expert 2.5K+
P: 2,878
Hard to say without the actual code of the function. ENCRYPTBYKEY second argument should either be of string or binary data types.

Good Luck!!!


~~ CK
Oct 8 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.