none
how the client system can access server SQL SERVER 2008 r2 database?

    Question

  • Hi am creating windows form application, back end SQL server 2008 r2, now am install SQL Server 2008 r2 on server. now am creating a form application from client machine. But i have an error (Error 40 Named pipe). 

    Any reference may be add?

    what kind steps to taken, to connect server database.

    Please Help me.

    Monday, April 23, 2012 5:29 AM

Answers

All replies

  • Hello,

    Can you please provide the full error message and some more informations about your code; we can't guess that all?

    Error 40 NP can occur if the SQL Server is not accessable from remote (Remote not enabled), blocked by firewall, the user don't have permissions to logon, wrong password or .... and so on.


    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing


    Monday, April 23, 2012 5:42 AM
  • Nothing more can be suggested without seeing the exact error message.

    But from your question, I can suggest a little:

    1. Go to SQL Server Configurations Manager and enable TCP/IP, Named Pipes etc.
    2. In your Windows Forms Application, you need to mention the server name in the connection string.
    Monday, April 23, 2012 7:01 AM
  • Hi Pradeep,

    The various causes fall into five categories:

    1. Incorrect connection string, such as using SqlExpress.
    2. NP was not enabled on the SQL instance.
    3. Remote connection was not enabled.
    4. Server not started, or point to not a real server in your connection string.
    5. Other reasons such as incorrect security context.

    For more information, please refer to http://blogs.msdn.com/b/sql_protocols/archive/2007/03/31/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server.aspx.

    Thanks,
    Maggie


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.

    Tuesday, April 24, 2012 2:33 AM