Last post Mar 14, 2013 11:47 AM by TheHoboLord
Feb 07, 2013 04:30 PM|singhswat|LINK
I'm using a dataset.xsd and using the designer I'm adding a new "DataAdapter" and populating the data with a stored procedure, And in the handler code behind I'm just creating a object of the dataadaper and call the fill method.
I've done this succesfuly for Seven Previous instance, but now when I add a new adapter it throws me a error which is quite vauge.
When I check the Preview Mode it successfully fills the data, but the code behind throw following error "provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"
Inner Exception talks about couldn't open the connection etc... If it couldn't open the connection then how did it fill the previous datatables ...
I'm quite lost with this.
Any help is appreciated.
Feb 08, 2013 09:05 PM|Decker Dong - MSFT|LINK
but the code behind throw following error "provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"
Where did this error happen——In the Wizard window？
Or just in the code-behind？
Can you offer us related screenshots or codes where the error is thrown out？
Mar 14, 2013 11:47 AM|TheHoboLord|LINK
"provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"
I was working on a project with LinqDataSource and this error hit me as well.
First I thought connection strings, nope.
Then I thought I was not listed in the security for this place, nope.
Well, I changed this from a local project to server.
When I did this I changed the connection strings, what I didnt see is that the connections I had posessed a different name.
The LinqDataSource auto generated stuff grabbed that name, I changed it and YAY.. it was fine.
Hope this was helpful.