www.webdeveloper.com
Results 1 to 12 of 12

Thread: ASP SQL 2005 Login failed for user - error '80040e4d'

  1. #1
    Join Date
    Jul 2006
    Posts
    6

    ASP SQL 2005 Login failed for user - error '80040e4d'

    Hi guys,

    I am a newbie in SQL 2005. Actually, I just want to get connect to SQL 2005 via ASP.... but it comes up the following error ...

    Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'

    [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'manfree'. The user is not associated with a trusted SQL Server connection


    My Source Code is:

    set adocon = server.CreateObject("ADODB.Connection")
    adocon.open "Driver={SQL Server};Server=10.0.0.254;Database=myDatabase;Uid=manfree;Pwd=manfree;"


    I think I didn't configure it well ... (on permission settings and others ...)
    Is there any people who can give me a step by step configuration
    Or URLs are also welcome ~~

    By the way, the Platform is windows 2003, IIS6, SQL 2005

    Thanks ~

  2. #2
    Join Date
    Feb 2003
    Posts
    2,745
    your connection string should look like this
    Code:
    "Provider=SQLOLEDB.1;Password=pwd;Persist Security Info=True;User ID=user;Initial Catalog=[dbname];Data Source=servernameOrIP"

  3. #3
    Join Date
    Jul 2006
    Posts
    6
    arr ... then it comes up with the following error ...

    Microsoft OLE DB Provider for SQL Server (0x80004005)
    Login failed for user 'manfree'. The user is not associated with a trusted SQL Server connection


    I have tried the following connection string as well ... but the outcome is still the same ...
    adocon.open "Provider=SQLNCLI;Server=10.0.0.254;Database=myDatabase;Uid=manfree;Pwd=manfree"

  4. #4
    Join Date
    Feb 2003
    Posts
    2,745
    need to check that remote connections are enabled in sql server 2005 surface area configuration tool.

  5. #5
    Join Date
    Feb 2003
    Posts
    2,745
    also make sure sql server browser service is running on sql server.

  6. #6
    Join Date
    Jul 2006
    Posts
    6
    - The remote connections are enabled
    - SQL server browser service is running

    Do you think I made the incorrect permission setting ??

  7. #7
    Join Date
    Feb 2003
    Posts
    2,745
    looks like. do u have admin authority over sql server? what version of sl2k5? express? enterprise?

  8. #8
    Join Date
    Jul 2006
    Posts
    6
    yes, i have. (the admin auth)

    Here are the info from the SQL 2005 Enterprise

    Microsoft SQL Server Management Studio 9.00.1399.00
    Microsoft Analysis Services Client Tools 2005.090.1399.00
    Microsoft Data Access Components (MDAC) 2000.086.1830.00 (srv03_sp1_rtm.050324-1447)
    Microsoft MSXML 2.6 3.0 5.0 6.0
    Microsoft Internet Explorer 6.0.3790.1830
    Microsoft .NET Framework 2.0.50727.42
    Operating System 5.2.3790


    And I still keep searching the solution in GOOGLE ~~ arr ~~~ headache ~ ha ha

  9. #9
    Join Date
    Feb 2003
    Posts
    2,745
    checked user "manfree" is a valid db user ?

  10. #10
    Join Date
    Jul 2006
    Posts
    6
    that's why i need to search for step by step premission setting ...
    I have no idea on which part of setting I've missed ...
    Do you have any related URLs for that ?
    Thank you

  11. #11
    Join Date
    Feb 2003
    Posts
    2,745
    see here for creating user accounts in sql 2k5. also see this article

    also, in management studio, under security, you can see all valid db users. right-click user to see what permissions/roles they have in database

  12. #12
    Join Date
    Feb 2003
    Posts
    2,745
    might want to look at this one too

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles