Redirecting connection of ADP *before* startup

  • Thread starter Thread starter Ruben L
  • Start date Start date
R

Ruben L

Moving an .adp back and forth between my customer's server and my dev.
server, I currently load the .adp in the new location - and wait for two
timeouts to occur before I can enter the adp and change the File->Connection
settings.

Does anyone know a way two avoid waiting for the timeouts?
Best regards
 
Two timeouts?? Do you have any autoexec command running at startup?

In your case, if both databases have the same name then the easiest way
would be to create an alias on your local machine with the same name as the
name of the server at your client location (or even use (local) if the
server is the local machine in both cases).

Otherwise, execute the following two commands in the Immediate Window or in
the OnClick event of a button:

CurrentProject.CloseConnection
CurrentProject.OpenConnection ""
 
Thanks, Sylvian!
I wasn't too optimistic about the alias since the production server was
given as a TCP/IP address qqq.xxx.yyy.zzz - but it worked! when I (used the
MS Sql Server Client Network Utility to) set an alias.

The
CurrentProject.CloseConnection
CurrentProject.OpenConnection ""
- is good for cleaning up dev. settings, but it requires entering all
connection info after each move, so its not feasible to just send the .adp to
the customer - but with the alias I can!
Thx again
/Ruben
PS: No autoexec, but the startup form has a bound subform, so maybe that's
why I get a time out before the "NETLIB Connection Open..." occurs.
 
For the OpenConnection "", you could use an autoexec macro that would test
for the connection string and reset it to the client when it's empty.
 
Back
Top