Topic: Error when creating a connection to a SQL database and giving it a previously used name.

Solution: When you create a connection to a SQL database then delete the connection and then try to recreate a connection to the same database while assigning the same name an error can occur. The solution is to give the connection a new name and then update your connections in the program or data- tier to reflect the new name.

 

Topic: New connection object created when updating a data adapter.

 

Solution: When you update a data adapter to reflect the connection to a database on a different computer/sql server you will create a new connection. When you create this new object the data adapter will then use this connection as opposed to the old one. The best idea is to copy the name of the old connection object then delete it and insert the name of the old object for the new one. While the program will run without this step you will have an unused object in your program (or more than one if you have multiple connections) and any reference to the old connection object (or objects) will be invalid.