EncryptByKey KeyGUID string truncate

  • Hi Folks

    EncryptByKey (Key_GUID('Name_SymKey'), @dex)

    @dex has 9000 char length

    error:

    Msg 8152, Level 16, State 10, Line 360

    String or binary data would be truncated.

    The statement has been terminated.

    it happens when we are inserting encrypted value to a varbinary(max) column in a table

    any idea ?

     

    appreciated

  • without the full code (insert + table ddl) its not possible to state the exact issue - but I would guess the order of the columns being inserted do not match the correct order of the columns being inserted onto.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply