connection string dring me nuts!

Discussion in 'ASP General' started by middletree, Feb 15, 2005.

  1. middletree

    middletree Guest

    First, here's my code(replaced some info with "foo":

    Dim strDBConnection
    strDBConnection = _
    "Provider=SQLOLEDB;" & _
    "Persist Security Info=False;" & _
    "Data Source=w2003\ticketlog;" & _
    "User ID=foo;" & _
    "Password=foo;" & _
    "Database=foo;"

    Dim objConnection
    Set objConnection = Server.CreateObject("ADODB.Connection")
    objConnection.Open strDBConnection
    =======================================================================

    I hve code very similar to this which works perfectly, but when running this
    on this new machine I built, it doesn't work. I get the following error:

    Microsoft OLE DB Provider for SQL Server error '80004005'
    Login failed for user 'foo'. Reason: Not associated with a trusted SQL
    Server connection.
    /includes/database_connection.inc, line 13

    =====================================

    Looking at the error description, it seems as though I need to add that
    user. I have, of course, added that user to the machine, and also to the SQL
    Server database. Not sure what to do with this.

    I should add that ASP itself seems to be working. I did a response.write of
    the current time to verify this.

    Anyone got an idea where to look for answers?
     
    middletree, Feb 15, 2005
    #1
    1. Advertising

  2. You must set the SQL-Server authentification mode to "SQL Server and
    Windows", not to "Windows only".

    It is also possible that the password is wrong.

    S. L.

    "middletree" <> wrote in message
    news:...
    > First, here's my code(replaced some info with "foo":
    >
    > Dim strDBConnection
    > strDBConnection = _
    > "Provider=SQLOLEDB;" & _
    > "Persist Security Info=False;" & _
    > "Data Source=w2003\ticketlog;" & _
    > "User ID=foo;" & _
    > "Password=foo;" & _
    > "Database=foo;"
    >
    > Dim objConnection
    > Set objConnection = Server.CreateObject("ADODB.Connection")
    > objConnection.Open strDBConnection
    > =======================================================================
    >
    > I hve code very similar to this which works perfectly, but when running
    > this
    > on this new machine I built, it doesn't work. I get the following error:
    >
    > Microsoft OLE DB Provider for SQL Server error '80004005'
    > Login failed for user 'foo'. Reason: Not associated with a trusted SQL
    > Server connection.
    > /includes/database_connection.inc, line 13
    >
    > =====================================
    >
    > Looking at the error description, it seems as though I need to add that
    > user. I have, of course, added that user to the machine, and also to the
    > SQL
    > Server database. Not sure what to do with this.
    >
    > I should add that ASP itself seems to be working. I did a response.write
    > of
    > the current time to verify this.
    >
    > Anyone got an idea where to look for answers?
    >
    >
    >
     
    Sylvain Lafontaine, Feb 15, 2005
    #2
    1. Advertising

  3. middletree

    Jeff Cochran Guest

    On Mon, 14 Feb 2005 22:49:30 -0600, "middletree"
    <> wrote:

    >First, here's my code(replaced some info with "foo":
    >
    >Dim strDBConnection
    >strDBConnection = _
    > "Provider=SQLOLEDB;" & _
    > "Persist Security Info=False;" & _
    > "Data Source=w2003\ticketlog;" & _
    > "User ID=foo;" & _
    > "Password=foo;" & _
    > "Database=foo;"
    >
    >Dim objConnection
    >Set objConnection = Server.CreateObject("ADODB.Connection")
    >objConnection.Open strDBConnection
    >=======================================================================
    >
    >I hve code very similar to this which works perfectly, but when running this
    >on this new machine I built, it doesn't work. I get the following error:
    >
    >Microsoft OLE DB Provider for SQL Server error '80004005'
    >Login failed for user 'foo'. Reason: Not associated with a trusted SQL
    >Server connection.
    >/includes/database_connection.inc, line 13
    >
    >=====================================
    >
    >Looking at the error description, it seems as though I need to add that
    >user. I have, of course, added that user to the machine, and also to the SQL
    >Server database. Not sure what to do with this.
    >
    >I should add that ASP itself seems to be working. I did a response.write of
    >the current time to verify this.
    >
    >Anyone got an idea where to look for answers?


    Start with the FAQ:

    Why do I get database-related 80004005 errors?
    http://www.aspfaq.com/show.asp?id=2009

    Note the references to these:

    http://www.aspfaq.com/show.asp?id=2138
    http://www.aspfaq.com/show.asp?id=2126
    http://support.microsoft.com/default.aspx/kb/306586

    Jeff
     
    Jeff Cochran, Feb 15, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bob

    format driving me nuts

    bob, Jul 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    385
  2. Simple Simon

    DateTime driving me nuts

    Simple Simon, Jul 29, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    370
    Simple Simon
    Jul 29, 2003
  3. Kathy Burke
    Replies:
    6
    Views:
    630
    Munsifali Rashid
    Aug 13, 2003
  4. Marty

    Driving me nuts...

    Marty, Nov 10, 2003, in forum: ASP .Net
    Replies:
    12
    Views:
    682
    Guest
    Nov 12, 2003
  5. Wayne...
    Replies:
    1
    Views:
    179
    [ + 2 0 r p 3 ]
    May 17, 2004
Loading...

Share This Page