473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ASP / SQLServer connection

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?
Jul 20 '05 #1
2 1337
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:Rm****************@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?

Jul 20 '05 #2
Stop using ODBC/DSN. This may not resolve the issue, but at least your
application will be faster & the database connection will be supported
in the future.

Please read the following pages.

http://www.aspfaq.com/show.asp?id=2126

http://msdn.microsoft.com/library/de...components.asp

Peter Morris wrote:
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

--
Please do not contact me directly or ask me to contact you directly for
assistance.

If your question is worth asking, it's worth posting.

If it’s not worth posting you should have done a search on
http://www.google.com/ http://www.google.com/grphp?hl=en&tab=wg&q= or
http://news.google.com/froogle?hl=en&tab=nf&ned=us&q= before wasting our
time.
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Gary Whitten | last post by:
We have a JDBC project that works with SQLServer, along with other DBs. During development, we noticed that resource useage on SQLServer seemed to grow steadily - Processes, Process Locks and/or...
1
by: mdurliSPAMFILTER | last post by:
Hello, I developed a win32 .exe CGI that connects to a clustered SQLServer to report some data. The software is written with Borland C++Builder. This is the oledb string:...
14
by: Roy Gourgi | last post by:
Hi, I need to store and retrieve information from a database. It looks as though there is a lot more support for SQLServer than there is for Access, correct me if I am wrong. What do I have...
2
by: saroxonline76 | last post by:
Dear all, I installed Visual Basic 2005 Express and SqlServer Express. I tried some features of both of them but I'm not able to connect a databse through a network. To explain, I have two...
3
by: Dan Sikorsky | last post by:
Can I use SQLServer 2000 with ASP.NET 2.0 instead of SQLServer 2005, and use the .Net 2.0 Membership functionality? I've setup my Login page, controls, etc., and now it's time to use the Web...
2
by: dgk | last post by:
I'm using the standard provider for membership which is SQLServer Express. After deploying the app to our server, login fails because of an SQL problem. I'm guessing that the problem is that the...
5
by: alingsjtu | last post by:
Hello, every body. When execute dynamic generated multiple OPENQUERY statements (which linkes to DB2) in SQLServer, I always got SQL1040N The maximum number of applications is already connected...
7
by: kuldeep singh sethi | last post by:
Hi friends, i am suffering with one problem. i am unable to make connectivity between .net 2003 and sqlserver. I want to make connection String with sqlserver. but not possible. i am a new learner...
2
by: =?Utf-8?B?SmVmZnJleQ==?= | last post by:
How to configure the IIS, ASPNET userID, Windows or SQL Authentiation, std or integrated security for SQLserver database? The VS.net 2002 web server and SQL Server client are at the same PC, ...
21
by: adjo | last post by:
I am working on an app with an Access2002 frontend and Sql2005 backend. I have to use integrated security. I want to prevent my users from altering data in another way than via the frontend. It...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.