March 15, 2013 at 2:58 am
Can i use EncryptByPassPhrase for column of any datatype? I tried it for using integer,varchar and nvarchar. it worked properly. But when i use it for column of type nchar(10) i am getting error
Msg 8152, Level 16, State 5, Line 1
String or binary data would be truncated.
The statement has been terminated.
In the article http://technet.microsoft.com/en-us/library/ms190357(v=sql.105).aspx it is used only for varbinary. Does it can be used for any type of column because it is working for integer,varchar and nvarchar. Please clarify my doubts.
Thank you
March 15, 2013 at 3:56 am
You can encrypt
@cleartext
A variable of type nvarchar, char, varchar, binary, varbinary, or nchar containing the cleartext.
Maximum size is 8,000 bytes.
ENCRYPTBYPASSPHRASE return varbinary value
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy