Re: ASP / SQLServer connection

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 10/09/04


Date: Sat, 9 Oct 2004 09:35:56 -0500

Your connection string uses SQL authentication but the error message looks
like Windows authentication was attempted. Did you specify SQL
authentication or Windows authentication in your ODBC setup? Is your SQL
Server configured to allow both SQL and Windows authentication?

Also, note that you should never use 'sa' for application database
connections and you may get uninvited guests with a blank 'sa' password.

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
"Peter Morris" <nospam.ple@se> wrote in message 
news:RmS9d.5432$xb.1658@text.news.blueyonder.co.uk...
> Hi, I'm having trouble connecting to SQLServer in my ASP program.
>
> here's the code
>
> <%
> dim objConnection, ObjRecorSet, strConnection, strOut, objCmd, 
> objParameters
> Set objConnection = Server.CreateObject ("ADODB.Connection")
> strConnection = "DSN=SQL_Tracker;Database=Tracker;UID=sa;PWD=;"
> objConnection.Open strConnection
> ...
> %>
>
> I'm getting this error on the line that opens the connection.
>
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 
> 'HOME\IUSR_HOME'.
> /Tracker/list_team.asp, line 11
>
>
> Notes:
>
> I've set up the DSN called 'SQL_Tracker'  in my ODBC settings.
> When I use the Test Connection button it's successful.
>
> The SQL Server is running on my own computer, and so I have
> full DBA  rights on it
>
> any ideas what's wrong?
> 


Relevant Pages

  • Re: SQL Server uses Windows authentication
    ... > With Windows Authentication you do not put any credentials in the ... The connection uses the credentials of whatever ... >> 1 remote web server to connect to an SQL db on a completely different ...
    (microsoft.public.inetserver.asp.db)
  • Re: Login failed for user IIS APPPOOLDefaultAppPool.
    ... there is a database with this name. ... you that the connection string I'm using implies Windows authentication; ... newbie when it comes to SQL, ...
    (microsoft.public.sqlserver.connect)
  • Re: perplexing SQL authentication from ASP.net issue
    ... the sql must be local or sql standard secuirty must be used. ... > directory security is set to Integrated Windows Authentication only. ... > I've tried a variety of connection strings. ... > connection string that VS.net uses. ...
    (microsoft.public.sqlserver.security)
  • Re: Login failed for user . The user is not associated with a trusted SQL Server connection.
    ... want to connect to an SQL 2005 server running on Windows 2003. ... If I use SQL authentication, ... windows authentication it gives the above error. ... server with that, it reports that the test connection is successful, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP / SQLServer connection
    ... Your connection string uses SQL authentication but the error message looks ... Did you specify SQL ... authentication or Windows authentication in your ODBC setup? ...
    (microsoft.public.sqlserver.programming)