Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Symmetric in HTML/VBScript program

Status
Not open for further replies.

mcauliff

Programmer
Feb 26, 2007
71
US
I need to add encryption to a column in an SQL Server 2005 table. The Symmetric key and certificate have been created. I have verified that in Management Studio that I'm able to insert into the encrypted column.

When I coded the Open symmetric into the program source, I get an error. It is just the HTML error page.

I know it is because of this statement;
Open Symmetric key MKey decryption by certificate MCertificate

because when I remove it, the program works.

If possible, please indicate what I need to do inside the program source.
 
What type of object are you executing the script from?

(When I have done this, I have exectued the whole thing via a stored proc.. - however what type of object library and object are you using?)

 
Actually I guess you are using vbscript. are you using ado? if so what type of object are you using.. Command, Connection, Recordset?

It all needs to be executed as a single statement, You might need to terminate the line with a semicol. YOu should be able to do this with a command or connection.

My advice is use a stored proc and pass any secure bits in as parameters.


Rob


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top