For asp, no, there is not a way to automate which is used.
For PHP we offer a Dynamic Connection extension for this.
For ASP, i recommend changing the connection to use the remote connection string, uploading it to the server, then changing the permissions on the connections file on the remote server to read only. This way, when you revert the connection to the local connection string, Dreamweaver will fail if it tries to over write the one on the server.