Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server 2000 ODBC Error '80004005'

Status
Not open for further replies.

SQLBI

IS-IT--Management
Joined
Jul 25, 2003
Messages
988
Location
GB
Hi,

We're trying to implement a SQL Server 2000 back end website and are receiving the following error message during testing

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC SQL Server Driver][Named Pipes]Access denied.

/inc_home_ticker.asp, line 10


To our knowledge, the ODBC connection is configured correctly with the correct SQL Server login info but still no connection is possible.

The code for the .asp page is as follows:

Code:
<%
Dim rsTicker, DD, MM, YY, today
DD = Left(Now,2)
MM = Mid(Now,4 ,2)
YY = Mid(Now,7, 4)
strToday = (MM & "/" & DD & "/" & YY)
'Response.Write(strToday)

Set rsTicker = Server.CreateObject("ADODB.Recordset")
[b]rsTicker.ActiveConnection = vets4petsdb1_conn[/b]
rsTicker.Source = "SELECT * FROM ticker WHERE (expiry_dat >= '" & strToday & "') AND (active_int <> 0)"
rsTicker.CursorType = 0
rsTicker.CursorLocation = 2
rsTicker.LockType = 1
rsTicker.Open()
%>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr>
    <td>
	<marquee behavior="scroll" direction="left" loop="-1" scrollamount="1" scrolldelay="10" truespeed height="20" class="tickertext">
&lt;&lt; 
	<%
		While Not rsTicker.EOF AND Not rsTicker.BOF
	%>
<a href="article_viewer.asp?dbid=<%=(rsTicker("dbid"))%>"><%=(rsTicker("title_vch"))%></a> &lt;&lt; 
	<% 
		rsTicker.MoveNext()
		Wend
	%>
</marquee></td>
  </tr>
  <tr>
    <td><img src="images/spacer.gif" width="760" height="1"></td>
  </tr>
</table>
<%
rsTicker.Close()
Set rsTicker = Nothing
%>

The ODBC connection is configured as follows:

Code:
DSN=vets4pets_db1_conn; uid = V4PWeb; pwd=V4PW3b;

Can anyone suggest a fix for this as i have zero SQL DB/Web knowledge.

Thanks in advance.


Leigh Moore
Business Systems Manager
Vets4Pets Veterinary Group
 
When you say the ODBC connection is configured that way, do you mean that you'd set the variable vets4petsdb1_conn to that?

I'm not sure how much you know about ASP, but in this line:
Code:
rsTicker.ActiveConnection = vets4petsdb1_conn
vets4petsdb1_conn is a variable... probably undeclared. If you wanted to use that value as the ActiveConnection then you'd use;
Code:
rsTicker.ActiveConnection = "vets4petsdb1_conn"
Yet that's not a valid connection. Your connection string should look something like:
Code:
rsTicker.ActiveConnection = "DSN=vets4pets_db1_conn;Uid = V4PWeb;Pwd=V4PW3b"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top