Switching connection properties at startup

  • Thread starter Thread starter Atlas
  • Start date Start date
A

Atlas

In a previous post I've learned how to switch programmatically from two
database servers on two computers.

At startup a .ini file is read and the proper server is set.

Unfortunatelly it looks like the .adp project saves on exit the last server,
so before being able to switch to the local server, Access tries to restore
the previous connection, hanging for 30 seconds.

Is there a way to switch immediately before Access's "restore"?

Bye

***************************************************
Atlas: Rookie powered by AC2003 - A smart "by design" product!
***************************************************
 
If you don't want the old connection properties to be used automatically
then you need to clear the connection before closing the application. The
most effective way to do this is to run the following code in the close
event of a hidden form:

CurrentProject.OpenConnection ""

The next time the application opens it will be in a disconnected state. You
can then present your own logon form and set the SQL Server connection
programmatically.

Brian M. Sockey
www.farsightsolutions.com
 
Back
Top