Results 1 to 7 of 7

Thread: MSSQl Connection for TCP/IP - not Named Pipes

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    Question MSSQl Connection for TCP/IP - not Named Pipes

    I'm having a tough time here figuring this out. I tried the asp code below to connect to my mssql server but it fails and the support people say I am trying to connect using named pipes and need to change it to tcp/ip. Can someone show me what I need to change to make it into tcp/ip connection? I would GREATLY appreciate it!


    <%
    function set_conn(func_opt, func_conn )
    if func_opt = true then
    set set_conn = createobject("adodb.connection")
    set_conn.open "DRIVER={SQL Server};SERVER=sql2k.website.com;UID=myid;PWD=mypassword;DATABASE=mydb"
    else
    func_conn.close
    set func_conn = nothing
    end if
    end function



    Set conn = set_conn(true,null)
    Set RS = server.CreateObject("adodb.recordset")
    mysql = "Select userno From mytable where email = '" & trim(UN2) & "' and password = '" & trim(PW2) & "'"
    RS.Open mysql, conn


    And I get this error:

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC SQL Server Driver][Named Pipes]Access denied.



    Thanks!

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    I think you have to use an actual IP address..... oooorrrr.... now that I think about it.....there is a tool called the SQL Server Client Netweork Utility --- run that... and make sure the TCP/IP has been enabled. I think that Named Pipes is the only enabled connection type by default. While you are at it, you'll probably will want to move TCPIP up to the top of the list -- SQL will connect in the order specified top to bottom.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463
    I don't think I can do any of this. I am using a shared sql server with my hosting server and I was just provided the sql server name, database, user id and password.

    Any thoughts anyone?

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    This is a CLIENT tool.... it doesn't affect the server, just how you connect to it.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463
    I wrote support to who runs the servers and they said it was in my script. Of course, their support sucks so bad, they could not have even pointed out what I needed to change!

    Their reply:

    The reason you can't connect is because your ASP script is using NamedPipes for connection. Change it to a TCPIP connection string and you should be good to go.

  6. #6
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Originally posted by WarrenW
    I wrote support to who runs the servers and they said it was in my script. Of course, their support sucks so bad, they could not have even pointed out what I needed to change!

    Their reply:

    The reason you can't connect is because your ASP script is using NamedPipes for connection. Change it to a TCPIP connection string and you should be good to go.
    Man that sucks.....
    I found this: http://msdn.microsoft.com/library/de...tringTopic.asp
    Based on that, I'd suggest trying Address insead of server.....
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Also see if this leads anywhere...
    http://beta.experts-exchange.com/Web..._20498896.html
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

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



Click Here to Expand Forum to Full Width