I have a CLR Trigger deployed to a database and working in development SQL Server.
I now need to deploy it to a second database in the same SQL Server instance. I have a script that creates the assembly and each of the four triggers but the triggers crash when launched in the second database.
I am using "Using cn As New SqlConnection("context connection=true")" for the connection and I surmise it is still trying to the original database.
If I use a regular connection can I get the trigger to read a file and update the connection string?
Are there alternative ways of doing this?