H
hawbsl
Our situation is this:
Our applications are built with the aid of the Dataset Designer in
Visual Studio 2005.
Using the Dataset Designer seems to require a defined Connectionstring
(specified through the TableAdapter Configuration Wizard). That's
fine. At least, that's fine in the development environment.
But the database path on the customer's site will always be different
from the one embedded in our connectionstring. The simple solution is
to have an xml file and pick up the connectionstring (or at least the
DB path) from that. The customer has his xml file pointing to the
correct location on his network and we have our own xml file pointing
to the correct location on our network.
Then, in the InitConnection in each TableAdapter, we replace the
wizard built
Me._connection.ConnectionString = MyConnectionString
with
Me._connection.ConnectionString = ConnectionStringFromXMLFile
But we have to remember to redo this every time the wizard overwrites
the Designer.vb file.
Is there a way to have a dynamic, flexible connectionstring without
this clumsy business of constantly rechanging the wizard built
InitConnection?
Thanks in advance for any help,
Hawbsl
Our applications are built with the aid of the Dataset Designer in
Visual Studio 2005.
Using the Dataset Designer seems to require a defined Connectionstring
(specified through the TableAdapter Configuration Wizard). That's
fine. At least, that's fine in the development environment.
But the database path on the customer's site will always be different
from the one embedded in our connectionstring. The simple solution is
to have an xml file and pick up the connectionstring (or at least the
DB path) from that. The customer has his xml file pointing to the
correct location on his network and we have our own xml file pointing
to the correct location on our network.
Then, in the InitConnection in each TableAdapter, we replace the
wizard built
Me._connection.ConnectionString = MyConnectionString
with
Me._connection.ConnectionString = ConnectionStringFromXMLFile
But we have to remember to redo this every time the wizard overwrites
the Designer.vb file.
Is there a way to have a dynamic, flexible connectionstring without
this clumsy business of constantly rechanging the wizard built
InitConnection?
Thanks in advance for any help,
Hawbsl