Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / November 2006



Tip: Looking for answers? Try searching our database.

Error encountered accessing Sql Server from ASP page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jackso95@hotmail.com - 17 Nov 2006 17:54 GMT
Appreciate any input to resolve this problem.

Thank you in advance.

Jack

1) Using a local web server on desktop WinXP-PRO
2) Connecting to a Win 2003 server - SQL server 2000 SP4
3) SQL server is configured for Mixed mode authentication (Windows and
Sql Server)
4) ALL Connection strings worked in VB
5) Network is a WORKGROUP environment

<html>

<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>New Page 1</title>
<%
Dim cnn, rs
Dim SqlString
Dim CnString
 Set Cnn = Server.CreateObject("ADODB.Connection")
 Set rs = Server.CreateObject("ADODB.Recordset")

' BOTH Connection String worked in VB
'CnString = "PROVIDER=SQLOLEDB;Data
Source=server;UID=sa;PWD=;DATABASE=ABCSTORE;"
'CnString = "PROVIDER=SQLOLEDB;Data Source=server;Integrated
Security=SSPI;DATABASE=ABCStore;"
CnString = "driver={SQL
Server};server=192.168.1.6;database=ABCSTORE;UID=sa;PWD=;"
cnn.Open CnString

SqlString = "Select top 10 * from wbw_line"

rs.Open SqlString, cnn

While Not rs.EOF
   response.write rs(0)
   rs.MoveNext
Wend
cnn.Close
Set cnn = Nothing
Set rs = Nothing
%>
</head>

<body>

</body>

</html>

Results from DIFFERENT connection strings:

CnString = "PROVIDER=SQLOLEDB;Data
Source=server;UID=sa;PWD=;DATABASE=ABCSTORE;"
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
Login failed for user 'sa'. Reason: Not associated with a trusted SQL
Server connection.
/testpage.asp, line 16

CnString = "PROVIDER=SQLOLEDB;Data Source=server;Integrated
Security=SSPI;DATABASE=ABCStore;"
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.
/testpage.asp, line 16

Also tried using:
CnString = "driver={SQL
Server};server=192.168.1.6;database=ABCSTORE;UID=sa;PWD=;"
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'sa'. Reason: Not associated with a trusted SQL Server connection.
/testpage.asp, line 17
Jeff Cochran - 18 Nov 2006 13:27 GMT
>Appreciate any input to resolve this problem.

>Microsoft OLE DB Provider for SQL Server (0x80004005)
>Login failed for user 'sa'. Reason: Not associated with a trusted SQL
>Server connection.

FAQ:
http://tutorials.aspfaq.com/8000xxxxx-errors/80004005-errors.html

Jeff
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.