473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Column level encryption error for numeric and datetime datatypes

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
2 4154
Rabbit
12,516 Expert Mod 8TB
That sounds like a pretty clear error message. You can't pass a numeric to encrypt.
Sep 28 '13 #2
ck9663
2,878 Expert 2GB
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

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

Similar topics

3
by: Savas Ates | last post by:
i have 3 columns in sql server .. all of them are numeric value when a user enter my site i take the value of userid (numeric one) i assign it as session("userid ") after a query i take 2...
1
by: Justin Wong | last post by:
CREATE PROCEDURE dbo.Synchronization_GetNewRecords ( @item varchar(50), @last datetime ) AS SET NOCOUNT ON
3
by: Ed | last post by:
Hi there, My problem is the following: When I assign a custom formatted Date & Time to a Date variable it loses it’s formatting. Ex. 2005-06-07 15:46 now when I assign this to a variable of...
1
by: juli jul | last post by:
Hello , I am trying to write to xml document (c#) by this code: XmlTextWriter xml_writer=null; xml_writer=new XmlTextWriter("Database.xml",null); xml_writer.WriteStartDocument();...
1
by: Marc | last post by:
I need to read and filter data from a data table on a remote sql server. The data needs to be filtered by a column DateTimeIn. I need to filter a week's worth of information depending on what a...
5
by: dbuchanan | last post by:
Is it possible to detect the SQLS2K column level permission for the logged in user. I want to be able to hide a control or Button based on user permission to edit that column. Can anyone...
3
by: Rich Robinson | last post by:
Hi, I have a web service method which takes a DateTime type as a parameter. The service is UK based, and the dates are passed in to the service in the UK format dd/MM/yyyy. On a recent...
9
by: Tony Van | last post by:
They're driving me nuts, especially with the Datareader. There are times when I want to pass a null date on to a date variable and I have to cast the null as a date!!!??? I'm wondering if I...
1
by: SnehaAgrawal | last post by:
Hi I get the error "Syntax error converting datetime from character string "for the following sql statement in Stored proc. SET @dynamicSQL =N'SELECT CUSTID,SHCodeLink FROM AccountMaster where...
2
by: 3ALAYA | last post by:
Hi .. Iam trying to do so >> Insert into LOANS (LOAN_CODE,LOAN_BALANCE,LENDED_TO,LONED_BY,INTREST_PERCENTAGE,BR_CODE) Values (200,100000,'ALYA','BUHAIRA',2,101) this is the table DESC ..
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.