Is there a way to programmatically change the connection string for a TableAdapter?

92 views Asked by At

I have a Dataset in a VS project. The Table Adapter in the Dataset has a connection string configured in it. In the connection string has a server name. The server name has a FQDN and that works fine unless the app runs on the LAN where the server is, then the Table Adapter cannot log in to the server. When the app runs on the LAN where the server is the FQDN cannot be present in the connection string, else the connection attempt fails.

The error is "The server was not found or is not accessible. SQL Network Interfaces Error 26. "

Is there a way to programmatically change the connection string for the TableAdapter so the end user can reconfigure the connection string?

0

There are 0 answers