Randy,
If you attach all your remoteviews to a single connection in the DBC, then you can just swap out the connectstring with a chunk of code:
if ( "office machine name" $ lower( sys(0) ) )
lcOld = "homename"
lcNew = "officename"
else
lcOld = "officename"
lcNew = "homename"
endf
? dbsetprop( "sqlConnection", "connection", "connectstring",
strtran( dbgetprop( "sqlConnection", "connection","connectstring" ), lcOld, lcNew ) )
>David, thanks for the reply.
>this has me very confused, I have made a connection called pcrconnect and have built my remote views as the data source pcrconnect I'm using a IP address that will allow me to hit the server in our office from my home office. So what I did I change the IP address in the pcrconnect connection to the name of the server in our office and recompiled the code and installed the exe on a work station in our office. I would have thought at this point this would work.
>
>But what is happening I get a connection failure and then the SQL server dialog box comes up with the IP address I used from my home office and not the name of the server. I can drill down and pick the server I want and all works well.