Need help with Database Error!

Demon

Guppy
Microsoft JET Database Engine error '80004005'

Not a valid file name.

/childcare/index.asp, line 12
--------------------------------------------------------

The code around that line is:
01 <% Option Explicit %>
02<!--#include file="common.asp" -->
03 <html>
04
05 <head>
06 <title>F.C.F.C.C.A - Fresno County Family Child Care Association</title>
07 </head>
08
09 <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
10
11 <table border="0" width="800" id="table1" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF" background="index.jpg" height="600">
12 <tr>
13 <td valign="bottom">
14 <table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0" height="14%">
15 <tr>
 
Demon said:
Microsoft JET Database Engine error '80004005'

Not a valid file name.

/childcare/index.asp, line 12
--------------------------------------------------------

The code around that line is:
01 <% Option Explicit %>
02<!--#include file="common.asp" -->
03 <html>
04
05 <head>
06 <title>F.C.F.C.C.A - Fresno County Family Child Care Association</title>
07 </head>
08
09 <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
10
11 <table border="0" width="800" id="table1" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF" background="index.jpg" height="600">
12 <tr>
13 <td valign="bottom">
14 <table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0" height="14%">
15 <tr>

That doesn't make much sense. Is the reference to childcare/index.asp in the common.asp file? Does childcare/index.asp exist?
 
The problem is in the common.asp i think, because it doesn't make any sense to have <tr> be an error. lol. The code I posted first was the index.asp page itself...
 
Code:
<% @ Language=VBScript %>
<% Option Explicit %>
<%
Dim adoCon
Dim strSQL
Dim rsCommon
Dim rsCommon2
Dim strDbPath
Dim strCon
Dim strMarqueeContent
Dim saryNewsContent(0)
Dim saryNewsTitle(0)
Dim intX
Dim intXX
Dim lngHitCounter
Dim strAdminUsername
Dim strAdminPass
Dim blnAdmin
Dim blnLoggedIn
Dim strLoggedInUsername
Dim strLoggedInPass

'Connection Strings
strDbPath = Server.MapPath("db/database.mdb")
strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & strDbPath
Set adoCon = Server.CreateObject("ADODB.Connection")

'Open the active connection
adoCon.Open strCon

blnAdmin = False
blnLoggedIn = False
intX = 0
Set rsCommon = Server.CreateObject("ADODB.RecordSet")
Set rsCommon2 = Server.CreateObject("ADOBD.RecordSet")

'Check to see if the user is logged In
If Request.Cookies("LoggedIn") = True Then
   blnLoggedIn = True
   strLoggedInUsername = Request.Cookies("Username")
   strLoggedInPass = Request.Cookies("Password")
   If Request.Cookies("Admin") = True Then blnAdmin = True
End If

'Get content
strSQL = "SELECT tblContent.* FROM tblContent;"
rsCommon.Open strSQL, adoCon
     strSQL = "SELECT TOP 1 tblEvents.* FROM tblEvents ORDER BY tblEvents.Event_Date DESC;"
     rsCommon2.Open strSQL, adoCon
          strMarqueeContent = rsCommon2("Event_name")
     rsCommon2.Close
     strMarqueeContent = strMarqueeContent & rsCommon("Marquee_content")
     lngHitCounter = rsCommon("Hit_Counter")
     strAdminUsername = rsCommon("Admin")
     strAdminPassword = rsCommon("AdminPass")
rsCommon.Close

strSQL = "SELECT TOP 5 tblNews.* FROM tblNews ORDER BY tblNews.Date DESC;"
rsCommon.Open strSQL, adoCon
Do while NOT rsCommon.EOF
     intX = intX + 1
     saryNewsContent(intX) = rsCommon("News_content")
     saryNewsTitle(intX) = rsCommon("News_title")
rsCommon.MoveNext
Loop
rsCommon.Close

Function UserCheck(strMember)
     strSQL = "SELECT tblProviders.Member, tblProviders.Password FROM tblProviders WHERE tblProviders.Member = " & strMember & ";"
     rsCommon.Open strSQL, adoCon
          UserCheck = rsCommon("Password")
     rsCommon.Close
End Function

%>
 
strDbPath = Server.MapPath("db/database.mdb")

maybe a silly question, but this is the right filename, yeah?

iirc, as reported, the error should actually be in childcare/index.asp, not common.asp, but in my experience this isn't always consistently true. the line numbers rarely make much sense...

just for laughs, check that childcare/index.jpg is there, too :)
 
Try connecting a sample test page to the same database.If that works fine add this code into that page,batch by batch.




Demon said:
Microsoft JET Database Engine error '80004005'

Not a valid file name.

/childcare/index.asp, line 12
--------------------------------------------------------

The code around that line is:
01 <% Option Explicit %>
02<!--#include file="common.asp" -->
03 <html>
04
05 <head>
06 <title>F.C.F.C.C.A - Fresno County Family Child Care Association</title>
07 </head>
08
09 <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
10
11 <table border="0" width="800" id="table1" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF" background="index.jpg" height="600">
12 <tr>
13 <td valign="bottom">
14 <table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0" height="14%">
15 <tr>
 
Back
Top