ASP vs ASP.NET connecting to SQL Server
From: Andy Sutorius (andy_at_sutorius.com)
Date: 03/14/04
- Next message: Marko Rangel: "binding to a datagrid with objects"
- Previous message: Andy Sutorius: "Simplistic conversion?"
- Next in thread: Chris Jackson: "Re: ASP vs ASP.NET connecting to SQL Server"
- Reply: Chris Jackson: "Re: ASP vs ASP.NET connecting to SQL Server"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 14 Mar 2004 17:40:29 GMT
When I run a ASP.NET application (ASP.NET Report Starter Kit) against SQL
Server I receive "User cannot login with null"
However when I run an ASP application against the same SQL Server it
works flawlessly
What setting am I missing in ASP.NET?
I have 2 computers, one is the web server the other is the sql server. I
am using SQL Authentication (not Windows Auth.)
For the ASP.NET application I have the connection string in the
web.config file with the user id and pwd in the conn string and trusted
connection set to true
In my ASP I have the following:
<html>
<head>
<title>HTMLPage1</title>
</head>
<body>
<%
cst = "Provider=SQLOLEDB;Data Source=SUTORIUSI;" & _
"Initial Catalog=Pubs;Network=DBMSSOCN;" & _
"User Id=sa;Password=sterling"
set conn = CreateObject("ADODB.Connection")
conn.open cst
set rs = conn.execute("Select au_lname from authors" )
do while not rs.eof
response.Write(rs(0) & "<br>")
rs.movenext
loop
%>
</body>
</html>
- Next message: Marko Rangel: "binding to a datagrid with objects"
- Previous message: Andy Sutorius: "Simplistic conversion?"
- Next in thread: Chris Jackson: "Re: ASP vs ASP.NET connecting to SQL Server"
- Reply: Chris Jackson: "Re: ASP vs ASP.NET connecting to SQL Server"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|