Results 1 to 11 of 11
  1. #1
    Join Date
    Mar 2004
    Location
    India
    Posts
    56

    Unanswered: Microsoft OLE DB Provider for SQL Server error '80004005'

    Hi friends,

    Can anyone help me in connecting sql server and asp.
    Wheneever try to do the connection, I am getting following error. All the connection string which i am using are correct.

    can you help me.

    Following are the error line

    ----------------------------------------------------------------

    Microsoft OLE DB Provider for SQL Server error '80004005'

    Invalid connection string attribute

    /MAsteringASP/global.asa, line 17

    Microsoft OLE DB Provider for SQL Server error '80004005'

    Invalid connection string attribute

    /MAsteringASP/test2.asp, line 21
    ------------------------------------------------------

    Please ckeck my code which I am using for connection


    Thank you

    Graceson MAthew

    ----------------------------------------------------------------
    <%@ Language =VBScript %>
    <% option explicit %>

    <Html>
    <head>
    <title> Database Connection </title>
    </head>
    <body>
    <%

    <!-- #INCLUDE FILE="adovbs.inc" -->

    dim conn
    dim sql
    dim r
    dim aConnectionString

    Set conn=Server.CreateObject("ADODB.Connection")

    conn.Mode=adModeReadWrite
    conn.Open="Provider=SQLOLEDB;UID=Administrator;Pas sword=passwd;Initial Catalog=nrth;Datasource=server ip;Port Number= 80"


    Response.Write (" Database Connectivity")

    %>
    </body>
    </html>

  2. #2
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393

    Re: Microsoft OLE DB Provider for SQL Server error '80004005'

    try this type of connection string

    driver={SQL Server};server=Server ip\DontForgetTheInstanceName;uid=Administrator;pwd =password;Database=nrth

  3. #3
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Also KBA to detail the connection between ASP & SQL Server.

    HTH
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    I don't recall Port NMumber being used in a connection string. Maybe if you took that part out?

  5. #5
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Ensure SQL uses that port and enabled on server or that port is not used by any other application.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  6. #6
    Join Date
    Sep 2003
    Posts
    522
    oh gosh, can't believe nobody saw this one!

    replace uid with user id


  7. #7
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Hehe. I guess that would be a problem for SQLOLEDB. Was UID phased out with the previous driver? Can't even remember what it was called. MSQL something-or-other.

  8. #8
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    MSDASQL

  9. #9
    Join Date
    Mar 2004
    Location
    India
    Posts
    56

    Re: Microsoft OLE DB Provider for SQL Server error '80004005'

    Dear karolyn,

    Thank you for your reply, i attended the problem i the way you suggested .But now i am getting some other error, which is also could not rectify me,

    now error is in following way
    -----------------
    Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.

    //global.asa, line 17

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.

    /test2.asp, line 21

    -------------------------------------------------------------------------

    Will you please help me .

    graceson






    Originally posted by Karolyn
    try this type of connection string

    driver={SQL Server};server=Server ip\DontForgetTheInstanceName;uid=Administrator;pwd =password;Database=nrth

  10. #10
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578

  11. #11
    Join Date
    Sep 2003
    Posts
    522
    i think you're trying to use windows authentication. in this case you need to try this:

    conn.Open="Provider=SQLOLEDB;Integrated Security=SSPI;Initial Catalog=nrth;Datasource=server ip;Port Number= 80"

    also, i noticed that if this is your "exact" connection string, you need to know the ip address of the server, as well as the actual port it's listening on. confirm it's port 80, otherwise the default is 1433 (port 80 is the default for http)

Posting Permissions

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