I think you should use a separate database; and that the database connection string should be held only in one place in your code. This will make it much simpler to connect to a different database for some useful purpouse but testing (say, having a parallel database running after a restore, or testing different versions of your app with different database schemas, and so on).
The time it'll take to insulate the connection string to a variable will be abundantly worth it.
By the way, you can very likely automate the task of finding-and-replacing, given that I guess you won't be opening a connection now and again and that the connection string - that I guess will be always the same - can be substituted to a global variable.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.