As the title implies, i have a vb program that has 60+ forms and the database for the data controls is on a server. To run it locally I would have to manually mod all forms with the dc, however, this is not feasible. The dc's that use the database name property are all named the same regardless of the form on which it is on.
1. How do I use the servers dbase when I run the app locally?
Create a connection object on the startup form?
You should never hold database connections as data members
You should never keep a connection longer than the life of the procedure that uses the connection because of performance issues (network traffic, connection pooling, locks, etc.)
You should always try to connect late and disconnect early.
I usually save a string to store the connection string as a global variable and set the connection's connectionString to that variable. Since you are using DC it might be good that you search on Disconnected Recordsets (recordsets where connection is set to Nothing)