
Global DB Connections...RunTime Variable used for Design-Time DataAdapter Connection
I have created an SQLConnection through input from an .ini file, and now
would like to use this connection for all DataAdapters, Commands, and
DataReaders throughout my application. Is there a way to use the designed
DataAdapters and assign a variable to the connection string or the
connection itself.
If I go into the "InitializeComponent" sub-routine (that you are not
supposed to edit) and change the connectionstring to the variable, I get a
design time error that the variable name has not been declared, yet it is
clearly a public variable and also works fine with run-time instances of the
DataAdapter control.
So in summary, how do you assign a run-time variable value to a design time
DataAdapter Connection string...or is it possible at all.