S
skyraider
Guest
Hey,
First of all, I know absolutely nothing about connecting Access databases. However, I know a tad bit of VB.NET (my site is written in ASP, though). I need some help connecting to the DB. Here's the script I'm currently using (I removed the database, account name and site name for security):
removed.mdb is in that directory. However, I'm getting the error message specified by the script. What exactly do I need to do to make this connection work? Please provide the exact code, as I don't know what I'm doing with Access connections.
Thanks 8)
First of all, I know absolutely nothing about connecting Access databases. However, I know a tad bit of VB.NET (my site is written in ASP, though). I need some help connecting to the DB. Here's the script I'm currently using (I removed the database, account name and site name for security):
Code:
<%@ Language=VBScript %>
<% OPTION EXPLICIT %>
<%
Dim oConn
on error resume next
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "D:\hshome\accountname\removed\removed.mdb"
If Err.Number <> 0 Then
%>
<html>
<head>
<title>Error</title>
<!-- #INCLUDE VIRTUAL="includes/style.css" -->
</head>
<body background="images/bg3.jpg" bgcolor="#000000" text="#C0C0C0">
<p align="center"><br> <br> <br> <br> <br> <br><font class="x" color="#FF0000"><b>Error accessing Database.</font><br> <br><font class="l" color="#FF0000">It may be being updated.<br> <br>Please retry in a few minutes.</b></font></p>
</body>
</html>
<%
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
on error goto 0
Response.Flush
Response.End
end if
on error goto 0
%>
removed.mdb is in that directory. However, I'm getting the error message specified by the script. What exactly do I need to do to make this connection work? Please provide the exact code, as I don't know what I'm doing with Access connections.
Thanks 8)