Client unable to establish connection

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Client unable to establish connection

    Hi,
    I get the connection as following:

    set objCon = CreateObject("ADODB.Connection")
    objCon.ConnectionTimeout = 15
    objCon.CursorLocation = adCmdTex
    objCon.Open "Provider=sqloledb;Data Source=mainDB;Initial
    Catalog=config;User Id=me;Password=pwd;"

    for i = 0 to objCon.Errors.Count
    sErr = sErr & "Opening con Error " & cstr(i + 1) & ": <"
    & objCon.Errors(i).Number & "> " & objCon.Errors
    (i).Description & vbCrLf
    next

    if sErr <> "" then
    Response.Write sErr
    end if

    I got:

    Opening con Error 1: <-2147467259> [DBNMPNTW]
    ConnectionOpen (CreateFile()). Opening con Error 2: <-
    2147467259> Client unable to establish connection

    what's wrong
    Jen Guest

  2. Similar Questions and Discussions

    1. Timed out trying to establish connection
      cool! i will give that a try next time it happens. we try to restart the service through the services console on windows but even the service hangs...
    2. #39979 [NEW]: PGSQL_CONNECT_FORCE_NEW will causes next connect to establish a new connection
      From: solar dot c at gmx dot net Operating system: SLES 10 PHP version: 5.2.0 PHP Bug Type: PostgreSQL related Bug...
    3. How to establish connection of DataGridView Control to Stock Excha
      Dear Sir, I m develop a application in vb.net which update a live prices of stocks by a website named (www.nseindia.com) i m using...
    4. The underlying connection as closed: Could not establish secure channel for SSL/TLS
      Ok, I try to communicate with a web service who receive xml message under a https using SSL. I have a directory with 240 XML files on my desktop....
    5. Establish a connection telnet in PHP on a UNIX server
      Hello, I wish to establish a connection in language PHP on a UNIX server by telnet. In fact, I would like : - Connect to server by sending IP...
  3. #2

    Default Re: Client unable to establish connection

    Jen wrote:
    > Hi,
    > I get the connection as following:
    >
    > set objCon = CreateObject("ADODB.Connection")
    > objCon.ConnectionTimeout = 15
    > objCon.CursorLocation = adCmdTex
    This is not a valid setting for CursorLocation, although you may have lucked
    out. The valid constants are listed here:
    [url]http://msdn.microsoft.com/library/en-us/ado270/htm/mdaenumac_13.asp[/url]
    > objCon.Open "Provider=sqloledb;Data Source=mainDB;Initial
    > Catalog=config;User Id=me;Password=pwd;"
    >
    <snip>
    > I got:
    >
    > Opening con Error 1: <-2147467259> [DBNMPNTW]
    The "DBNMPNTW" means that the Named Pipes network library is being used to
    create the connection to SQL
    > ConnectionOpen (CreateFile()). Opening con Error 2: <-
    > 2147467259> Client unable to establish connection
    >
    > what's wrong
    You must have an older version of MDAC on your machine since it seems that
    it is defaulting to Named Pipes to establish the connection. Which leads to
    possibility 1:

    Your SQL Server is configured to not use Named Pipes.

    You have a few options:

    1. Reconfigure SQL Server so it supports Named Pipes
    2. Upgrade to the latest MDAC ([url]www.microsoft.com/data[/url]), which will default
    to using TCP/IP
    3. Specify that TCP/IP should be used in the connection string: "...;network
    library=DBMSSOCN"

    Possibility 2:
    Your SQL Server is configured to only use Windows Security. It needs to use
    either mixed or SQL Server security to enable connections using username and
    password
    [url]http://support.microsoft.com?kbid=253500[/url]

    If none of the above fix the problem, see these:
    [url]http://support.microsoft.com?kbid=306518[/url]
    [url]http://support.microsoft.com/default.aspx?scid=/support/sql/content/connect/ClientIP.asp[/url]

    HTH,
    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows Guest

  4. #3

    Default Re: Client unable to establish connection

    Thank you very much. Now I know more about ado.
    how can I check my current MDAC version?

    >-----Original Message-----
    >Jen wrote:
    >> Hi,
    >> I get the connection as following:
    >>
    >> set objCon = CreateObject("ADODB.Connection")
    >> objCon.ConnectionTimeout = 15
    >> objCon.CursorLocation = adCmdTex
    >
    >This is not a valid setting for CursorLocation, although
    you may have lucked
    >out. The valid constants are listed here:
    >[url]http://msdn.microsoft.com/library/en-[/url]
    us/ado270/htm/mdaenumac_13.asp
    >
    >> objCon.Open "Provider=sqloledb;Data
    Source=mainDB;Initial
    >> Catalog=config;User Id=me;Password=pwd;"
    >>
    ><snip>
    >
    >> I got:
    >>
    >> Opening con Error 1: <-2147467259> [DBNMPNTW]
    >
    >The "DBNMPNTW" means that the Named Pipes network library
    is being used to
    >create the connection to SQL
    >
    >> ConnectionOpen (CreateFile()). Opening con Error 2: <-
    >> 2147467259> Client unable to establish connection
    >>
    >> what's wrong
    >
    >You must have an older version of MDAC on your machine
    since it seems that
    >it is defaulting to Named Pipes to establish the
    connection. Which leads to
    >possibility 1:
    >
    >Your SQL Server is configured to not use Named Pipes.
    >
    >You have a few options:
    >
    >1. Reconfigure SQL Server so it supports Named Pipes
    >2. Upgrade to the latest MDAC ([url]www.microsoft.com/data[/url]),
    which will default
    >to using TCP/IP
    >3. Specify that TCP/IP should be used in the connection
    string: "...;network
    >library=DBMSSOCN"
    >
    >Possibility 2:
    >Your SQL Server is configured to only use Windows
    Security. It needs to use
    >either mixed or SQL Server security to enable connections
    using username and
    >password
    >[url]http://support.microsoft.com?kbid=253500[/url]
    >
    >If none of the above fix the problem, see these:
    >[url]http://support.microsoft.com?kbid=306518[/url]
    >[url]http://support.microsoft.com/default.aspx?[/url]
    scid=/support/sql/content/connect/ClientIP.asp
    >
    >HTH,
    >Bob Barrows
    >
    >--
    >Microsoft MVP - ASP/ASP.NET
    >Please reply to the newsgroup. This email account is my
    spam trap so I
    >don't check it very often. If you must reply off-line,
    then remove the
    >"NO SPAM"
    >
    >
    >.
    >
    Jen Guest

  5. #4

    Default Re: Client unable to establish connection

    Jen wrote:
    > Thank you very much. Now I know more about ado.
    > how can I check my current MDAC version?
    >
    There's a tool called Component Checker that is available from the MDAC
    site: [url]www.microsoft.com/data[/url]

    Bob Barrows


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows Guest

  6. #5

    Default Re: Client unable to establish connection

    OK, I checked the Properties of the db server. Under
    Security tab, the "SQL Server and Windows" is selected. so
    possibility 2 is out. Also under General, the version is
    7.00.1077.

    For possibility 1, where can i configure the server to
    allow the Named Pipe?
    And I check the MDAC on the web server, it's MDAC 2.5 sp3.


    Thanks

    >-----Original Message-----
    >Jen wrote:
    >> Hi,
    >> I get the connection as following:
    >>
    >> set objCon = CreateObject("ADODB.Connection")
    >> objCon.ConnectionTimeout = 15
    >> objCon.CursorLocation = adCmdTex
    >
    >This is not a valid setting for CursorLocation, although
    you may have lucked
    >out. The valid constants are listed here:
    >[url]http://msdn.microsoft.com/library/en-[/url]
    us/ado270/htm/mdaenumac_13.asp
    >
    >> objCon.Open "Provider=sqloledb;Data
    Source=mainDB;Initial
    >> Catalog=config;User Id=me;Password=pwd;"
    >>
    ><snip>
    >
    >> I got:
    >>
    >> Opening con Error 1: <-2147467259> [DBNMPNTW]
    >
    >The "DBNMPNTW" means that the Named Pipes network library
    is being used to
    >create the connection to SQL
    >
    >> ConnectionOpen (CreateFile()). Opening con Error 2: <-
    >> 2147467259> Client unable to establish connection
    >>
    >> what's wrong
    >
    >You must have an older version of MDAC on your machine
    since it seems that
    >it is defaulting to Named Pipes to establish the
    connection. Which leads to
    >possibility 1:
    >
    >Your SQL Server is configured to not use Named Pipes.
    >
    >You have a few options:
    >
    >1. Reconfigure SQL Server so it supports Named Pipes
    >2. Upgrade to the latest MDAC ([url]www.microsoft.com/data[/url]),
    which will default
    >to using TCP/IP
    >3. Specify that TCP/IP should be used in the connection
    string: "...;network
    >library=DBMSSOCN"
    >
    >Possibility 2:
    >Your SQL Server is configured to only use Windows
    Security. It needs to use
    >either mixed or SQL Server security to enable connections
    using username and
    >password
    >[url]http://support.microsoft.com?kbid=253500[/url]
    >
    >If none of the above fix the problem, see these:
    >[url]http://support.microsoft.com?kbid=306518[/url]
    >[url]http://support.microsoft.com/default.aspx?[/url]
    scid=/support/sql/content/connect/ClientIP.asp
    >
    >HTH,
    >Bob Barrows
    >
    >--
    >Microsoft MVP - ASP/ASP.NET
    >Please reply to the newsgroup. This email account is my
    spam trap so I
    >don't check it very often. If you must reply off-line,
    then remove the
    >"NO SPAM"
    >
    >
    >.
    >
    Jen Guest

  7. #6

    Default Re: Client unable to establish connection


    Jen wrote:
    > OK, I checked the Properties of the db server. Under
    > Security tab, the "SQL Server and Windows" is selected. so
    > possibility 2 is out. Also under General, the version is
    > 7.00.1077.
    >
    > For possibility 1, where can i configure the server to
    > allow the Named Pipe?
    You need to run the SQL Setup program, but don't bother. Use TCP/IP to
    connect, using option 3 below.

    > And I check the MDAC on the web server, it's MDAC 2.5 sp3.
    I would upgrade it to at least 2.7.
    >> 3. Specify that TCP/IP should be used in the connection string:
    >> "...;network library=DBMSSOCN"
    Bob Barrows

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Barrows Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139