Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Problem using tutorial to encrypt a field

Author  Topic 

csphard
Posting Yak Master

113 Posts

Posted - 2010-04-21 : 11:39:04
Trying to use this example to learn how to encrypt a field.

http://vadivel.blogspot.com/2005/08/encrypt-and-decrypt-data-in-sql-server.html

When I try this
Open symmetric key symKeyemployees using password = 'smart3a?'
I get the error
Msg 102, Level 15, State 1, Line 1 Incorrect syntax near 'password'.

Why...

Howard

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-04-21 : 12:14:02
Try using:

OPEN SYMMETRIC KEY symKeyemployees
DECRYPTION BY password = 'smart3a?'

Regards,
Bohra

I am here to learn from Masters and help new bees in learning.
Go to Top of Page

csphard
Posting Yak Master

113 Posts

Posted - 2010-04-21 : 17:41:41
That worked thanks
Go to Top of Page

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-04-22 : 01:25:48
You are welcome.
Go to Top of Page
   

- Advertisement -