Actions/Hyperlinks and Different Environments

  • Any good suggestions on how to create Action expressions so that they can differ in different environments?

    What I am going for is being able to have a different URL in development, test, and production.

    Best I can come up with is storing the key parts in the database to limit what needs to be changed.

    Thanks!

  • Ideally, I like my test and production databases to be the same.  It makes things easier on a number of fronts.

    Yes, you could certainly create a table that has key/value pairs and that would  definitely work.  Because you want different strings stored (and used) on different servers, I'd add a column for server name.  Then, in your queries, you can add a WHERE ServerName = @@SERVERNAME predicate to the WHERE clause and you'll get the string values appropriate to the server.  I use this approach in some of my DBA tables that drive processes differently, depending on the server.

    It also lets you use the backup/restore approach to create a copy of production on test, etc. so your dev and test databases can be rebuilt as needed.

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

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