locked
DataSet & SQL Server 2008 R2 RRS feed

  • Question

  • User1509050366 posted

    Hello,

    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.

    Thanks,

    Swat

    Thursday, February 7, 2013 4:30 PM

All replies

  • User3866881 posted

    but the code behind throw following error  "provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"

    Hi,

    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?

    Friday, February 8, 2013 9:05 PM
  • User847609608 posted

    "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.

    Thursday, March 14, 2013 11:47 AM