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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with the SQL Data Source component

Status
Not open for further replies.

destroyhead

Programmer
Feb 22, 2006
27
GB
Hi,
When I am trying to use the new SQL Data Source component with a DataList, it works perfectly on localhost but when I try to see the page on the server I have the error :
"The connection name 'myconnectionname' was not found in the applications configuration or the connection string is empty. "
By using the old fashion way ( Datasource/Databind in the code), it's working.

Many thanks for your help.
 
destroyhead: Have you tried posting at the SQL Server: Programming Forum? I suspect they could nail this one rather quickly.
 
Thanks Isadore,
I have posted it on the other forum too.

Thanks jbenson001,
Visual Studio copied it. Actually, there are two web.config files. One in the directory where my site is and one at the same level of this directory
 
This is not a SQL Server issue. The problem is it is not reading the correct web.config file. I am not sure why there are 2. It seems as if it is reading the one on the root level, not the one in your project. Can you delete the other file and keep the one in your project, and try again?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top