>>>Hi,
>>>
>>>I am using cipher() function to encrypt a long string (250 char). Then I need to store the encrypted value into a field of a SQL Server table. Can the field be type CHAR(250)? or it must be NCHAR(250)?
>>>
>>>TIA
>>
>>varbinary(max) should work, I think.
>
>This is not what I am asking. I want the field to be exactly 250 char long. I am just not sure if it has to be CHAR or NCHAR (because of some characters that it has to store).
We routinely store encrypted values in char() fields, but mind you, "AutoTranslate=No;" must be in your connectstring, or else your characters may suffer codepage conversion.