Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection "has already been added"

Status
Not open for further replies.

GavW

Programmer
Jan 13, 2006
58
GB
Hey all!

I have just run into this problem. My website has just decided to return the error "The entry 'Connection' has already been added.

My connection string is located within my Web.Config file:

<add name="Connection" connectionString="Data Source=source;Initial Catalog=database;User ID=user;Password=pwd"
providerName="System.Data.SqlClient" />

As far as I am aware i have not changed anything that could of triggered this error message. I dont understand it though as I need that code in there to perform all of my database functions. Anybody know why this error occurs?
 
It's probably either a reserved name or it's already been added as part of a previous site or intstallation. Try either renaming ti to something else rather than Connection, or add a "<clear/>" tag before it.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
cheers mate! the clear tag works wonders!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top