/    Sign up×
Community /Pin to ProfileBookmark

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 … ?

[COLOR=Red]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[/COLOR]

My Source Code is:

[COLOR=SeaGreen]set adocon = server.CreateObject(“ADODB.Connection”)
adocon.open “Driver={SQL Server};Server=10.0.0.254;Database=myDatabase;Uid=manfree;Pwd=manfree;”[/COLOR]

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 ~

to post a comment

11 Comments(s)

Copy linkTweet thisAlerts:
@russellSep 01.2006 — your connection string should look like this
<i>
</i>"Provider=SQLOLEDB.1;Password=[b]pwd[/b];Persist Security Info=True;User ID=[b]user[/b];Initial Catalog=[dbname];Data Source=[b]servernameOrIP[/b]"
Copy linkTweet thisAlerts:
@manfreeauthorSep 01.2006 — arr ... then it comes up with the following error ... ?

[COLOR=Red]Microsoft OLE DB Provider for SQL Server (0x80004005)

Login failed for user 'manfree'. The user is not associated with a trusted SQL Server connection[/COLOR]


I have tried the following connection string as well ... but the outcome is still the same ...


[COLOR=SeaGreen]adocon.open "Provider=SQLNCLI;Server=10.0.0.254;Database=myDatabase;Uid=manfree;Pwd=manfree"[/COLOR]
Copy linkTweet thisAlerts:
@russellSep 01.2006 — need to check that remote connections are enabled in sql server 2005 surface area configuration tool.
Copy linkTweet thisAlerts:
@russellSep 01.2006 — also make sure sql server browser service is running on sql server.
Copy linkTweet thisAlerts:
@manfreeauthorSep 02.2006 — 
  • - The remote connections are enabled

  • - SQL server browser service is running


  • Do you think I made the incorrect permission setting ??
    Copy linkTweet thisAlerts:
    @russellSep 02.2006 — looks like. do u have admin authority over sql server? what version of sl2k5? express? enterprise?
    Copy linkTweet thisAlerts:
    @manfreeauthorSep 02.2006 — yes, i have. (the admin auth)

    Here are the info from the SQL 2005 Enterprise

    [COLOR=SandyBrown]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[/COLOR]


    And I still keep searching the solution in GOOGLE ~~ arr ~~~ headache ~ ha ha
    Copy linkTweet thisAlerts:
    @russellSep 02.2006 — checked user "manfree" is a valid db user ?
    Copy linkTweet thisAlerts:
    @manfreeauthorSep 02.2006 — 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
    Copy linkTweet thisAlerts:
    @russellSep 02.2006 — see [URL=http://msdn2.microsoft.com/en-us/library/ms173463.aspx]here[/URL] for creating user accounts in sql 2k5. also see [URL=http://msdn2.microsoft.com/en-us/library/ms189751.aspx]this article[/URL]

    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
    Copy linkTweet thisAlerts:
    @russellSep 02.2006 — might want to look at [URL=http://msdn2.microsoft.com/en-us/library/ms187328.aspx]this one[/URL] too
    ×

    Success!

    Help @manfree spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 4.25,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...