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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem connecting Access Databases to Website 1

Status
Not open for further replies.

SOG61

Technical User
Sep 18, 2005
47
GB
About six months ago I had to change my Server for my Old Boys Association Website to the 1&1
Ever since then when I try to open any page containing an Access Database I get the following error


Database Results Error
The database connection named 'oldboys2.mdb' is undefined.

This problem can occur if:
* the connection has been removed from the web
* the file 'global.asa' is missing or contains errors
* the root folder does not have Scripting permissions enabled
* the web is not marked as an Application Root

I have been in touch with 1&1 on countless occasions but have not been able to solve the problem
The site worked perfectly OK with our previous server
I have tried building a new page through a different Website but still get the same response
When I view the main page with a fault through Fron Page I get the following error report

This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.

Unfortunately my knowledge on this subject is very limited, ie I have tried to learn it by reading various books, which I find difficult to understand

from an ignorant SOG61
 
You have to rename the file as well and upload it.
 
xwb

Yes I changed and loaded the file as oldboys.asp, and also changed the link in the home page to oldboys.asp, and as soon as I do that the page only loads with an error report as my example shows.
As soon as I change it back to oldboys.htm the rest of the page works again, so I have changed the actual site back to htm so that it works, but left the file there so that my example shows you the end result.
Sorry if I misled you but I thought I did it as you intended, just loaded it again and it immediately shuts off the page again so have changed it back as I told a few members that have been asking about getting it repaired that it is now working again
Regards SOG1
 
xwb
To save messing members up again I have made the suggested change to the old boys link on the Committee Page:


and when you go to the Old Boys link at the top I get the page missing report, but the oldboys.asp file is still loaded
Regards SOG61
 
Sorry I didn't reply earlier - I was out Morris Dancing last night.

Anyway, the file looks pretty messed up. Looks like 3 files merged in one.
1) Open the file in notepad
2) Delete everything from the top until the third <html>

You're right - it should be an HTM file not an asp file. It is just that some spurious bits of 2 other files got merged on top of it.
 
xwb

Thanks again, the extra bits were things that 1&1 told me to add, but they didn't explain where to put them very well, file loads OK again, but the one page still does not open and search.
I have copied the file that doesn't work, oldboysdball.asp to see if you can see an error in there for me.
Trust you enjoyed your evening, I have a friend here in Kent who has been a Morris Dancer for many years.

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a FrontPage Component. Do not Edit.
FP_LCID = 2057 %>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<% ' FP_ASP -- ASP Automatically generated by a FrontPage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Old Dartechs</title>
</head>

<body background="../images/odwa_small_background.gif">

<h1 align="center">Old Dartechs' &amp; Wilmingtonians' Association<br>
<small><font color="#0000FF">Old Boys Database</font></small></h1>

<h3 ALIGN="center"><a href="JavaScript:;" onclick="window.top.close();"">Click
here to exit database</a></h3>

<hr>

<div align="center">
<center>
<table style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tbody>
<!--webbot bot="DatabaseRegionStart" s-columnnames="LastUpdated" s-columntypes="202" s-dataconnection="oldboys2.mdb" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="FALSE" b-tableexpand="FALSE" b-tableheader="FALSE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="TRUE" s-recordsource="get_last_update" s-displaycolumns="LastUpdated" s-criteria s-order s-sql="SELECT * FROM get_last_update" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="0" botid="0" u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc" u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--#include file="../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM get_last_update"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=1 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="oldboys2.mdb"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&LastUpdated=202&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="18806" --><tr>
<td>
<h4 align="center">
<!--webbot bot="DatabaseResultColumn" s-columnnames="LastUpdated" s-column="LastUpdated" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;LastUpdated&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"LastUpdated")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="28680" --></h4>
</td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the end of a Database Results region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--#include file="../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="56926" --></tbody>
</table>
</center>
</div>
<div align="center"><center>

<table BORDER="1" CELLSPACING="1" BORDERCOLOR="#0f5e00" CELLPADDING="2" WIDTH="421">
<tr>
<td WIDTH="16%" HEIGHT="17"><p
ALIGN="LEFT"><b><font face="MS Sans Serif" size="1">Position</font></b></td>
<td WIDTH="84%" HEIGHT="17"><font FACE="MS Sans Serif" SIZE="1" COLOR="#000000"><p
ALIGN="LEFT">&lt;blank&gt; = pupil, <strong>Ag</strong> = Agricultural College<br>
<b>S</b> = staff, <b>G</b> = Governor, <b>Pta </b>= PTA, <b>H</b> = Headmaster</font></td>
</tr>
<tr>
<td WIDTH="16%" HEIGHT="43"><p
ALIGN="LEFT"><b><font face="MS Sans Serif" size="1">DB Info</font></b></td>
<td WIDTH="84%" HEIGHT="43"><p
ALIGN="LEFT"><font face="MS Sans Serif" size="1" color="#000000"><b>y</b> = Full
contact details known<br>
<b>n</b> = No current contact
detail known<br>
<b>p</b>= Partial contact detail known<br>
<b>d</b>= Oldboy is deceased</font></td>
</tr>
<tr>
<td WIDTH="16%" HEIGHT="29"><font FACE="MS Sans Serif" SIZE="1"><b><p
ALIGN="LEFT">e-mail</b></font></td>
<td WIDTH="84%" HEIGHT="29"><p
ALIGN="LEFT"><b><font face="MS Sans Serif" size="1">on file</font></b><font FACE="MS Sans Serif" SIZE="1" COLOR="#000000"> = e-mail
address known<br>
<b>n/a </b>= No e-mail address known</font></td>
</tr>
</table>
</center></div>

<p ALIGN="LEFT"><a target="_blank" href="oldboysdball_help.htm">For Help on search
click here</a></p>
<form BOTID="2" METHOD="POST" ACTION="oldboysdball.asp">
<table BORDER="0">
<tr>
<td><b>Family Name</b></td>
<td>
<input TYPE="TEXT" NAME="Name1" VALUE="<%=Request("Name1")%>" size="20"></td>
</tr>
<tr>
<td><b>Given Name</b></td>
<td>
<input TYPE="TEXT" NAME="ChristianName1" VALUE="<%=Request("ChristianName1")%>" size="20"></td>
</tr>
<tr>
<td><b>Start Date</b></td>
<td>
<input TYPE="TEXT" NAME="Sdate" VALUE="<%=Request("Sdate")%>" size="20"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<h4>All fields are optional and partial entries are permitted</h4>
</td>
</tr>
</table>
<p><input TYPE="Submit"></p>
</form>
<table width="100%" border="1">
<thead>
<tr>
<td><b>Given<br>
Name</b></td>
<td><b>Family<br>
Name</b></td>
<td align="center"><b>Start<br>
Date</b></td>
<td align="center"><b>Leave<br>
Date</b></td>
<td align="center"><b>Email</b></td>
<td align="center"><b>Position</b></td>
<td align="center"><b>DB<br>
Info</b></td>
<td align="center"><b>Last<br>
Updated</b></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" s-columnnames="ChristianName1,Name1,Sdate,Ldate,Email1,Position,DBInfo,LastUpdate" s-columntypes="202,202,202,202,202,202,202,135" s-dataconnection="oldboys2.mdb" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="TRUE" s-recordsource="oldboys_select" s-displaycolumns="ChristianName1,Name1,Sdate,Ldate,Email1,Position,DBInfo,LastUpdate" s-criteria="[Name1] CNT {Name1} + [ChristianName1] CNT {ChristianName1} + [Sdate] CNT {Sdate} +" s-order s-sql="SELECT * FROM oldboys_select WHERE (Name1 LIKE '%::Name1::%' AND ChristianName1 LIKE '%::ChristianName1::%' AND Sdate LIKE '%::Sdate::%')" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="Name1=&amp;ChristianName1=&amp;Sdate=" s-norecordsfound="No records returned." i-maxrecords="500" i-groupsize="50" botid="2" u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc" u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--#include file="../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM oldboys_select WHERE (Name1 LIKE '%::Name1::%' AND ChristianName1 LIKE '%::ChristianName1::%' AND Sdate LIKE '%::Sdate::%')"
fp_sDefault="Name1=&ChristianName1=&Sdate="
fp_sNoRecords="<tr><td colspan=8 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="oldboys2.mdb"
fp_iMaxRecords=500
fp_iCommandType=1
fp_iPageSize=50
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ChristianName1=202&Name1=202&Sdate=202&Ldate=202&Email1=202&Position=202&DBInfo=202&LastUpdate=135&"
fp_iDisplayCols=8
fp_fCustomQuery=False
BOTID=2
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="14662" --><tr>
<td bgcolor="#FFFF00">
<!--webbot bot="DatabaseResultColumn" s-columnnames="ChristianName1,Name1,Sdate,Ldate,Email1,Position,DBInfo,LastUpdate" s-column="ChristianName1" b-tableformat="TRUE" b-hashtml="TRUE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;ChristianName1&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_Field(fp_rs,"ChristianName1")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="39613" --></td>
<td bgcolor="#FFFF00">
<!--webbot bot="DatabaseResultColumn" s-columnnames="ChristianName1,Name1,Sdate,Ldate,Email1,Position,DBInfo,LastUpdate" s-column="Name1" b-tableformat="TRUE" b-hashtml="TRUE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Name1&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_Field(fp_rs,"Name1")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="4066" --></td>
<td align="center" bgcolor="#FFFF00">
<!--webbot bot="DatabaseResultColumn" s-columnnames="ChristianName1,Name1,Sdate,Ldate,Email1,Position,DBInfo,LastUpdate" s-column="Sdate" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Sdate&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Sdate")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="8066" --></td>
<td align="center" bgcolor="#FFFF00">
<!--webbot bot="DatabaseResultColumn" s-columnnames="ChristianName1,Name1,Sdate,Ldate,Email1,Position,DBInfo,LastUpdate" s-column="Ldate" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Ldate&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Ldate")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="7618" --></td>
<td align="center" bgcolor="#FFFF00">
<!--webbot bot="DatabaseResultColumn" s-columnnames="ChristianName1,Name1,Sdate,Ldate,Email1,Position,DBInfo,LastUpdate" s-column="Email1" b-tableformat="TRUE" b-hashtml="TRUE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Email1&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_Field(fp_rs,"Email1")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="12419" --></td>
<td align="center" bgcolor="#FFFF00">
<!--webbot bot="DatabaseResultColumn" s-columnnames="ChristianName1,Name1,Sdate,Ldate,Email1,Position,DBInfo,LastUpdate" s-column="Position" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Position&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Position")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="16979" --></td>
<td align="center" bgcolor="#FFFF00">
<!--webbot bot="DatabaseResultColumn" s-columnnames="ChristianName1,Name1,Sdate,Ldate,Email1,Position,DBInfo,LastUpdate" s-column="DBInfo" b-tableformat="TRUE" b-hashtml="TRUE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;DBInfo&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_Field(fp_rs,"DBInfo")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="10569" --></td>
<td align="center" bgcolor="#FFFF00">
<!--webbot bot="DatabaseResultColumn" s-columnnames="ChristianName1,Name1,Sdate,Ldate,Email1,Position,DBInfo,LastUpdate" s-column="LastUpdate" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;LastUpdate&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"LastUpdate")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="27820" --></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="50" clientside tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the end of a Database Results region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;TR&gt;&lt;TD VALIGN=MIDDLE COLSPAN=64&gt;&lt;NOBR&gt;&lt;INPUT TYPE=Button VALUE=&quot; |&lt; &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &lt; &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &gt; &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &gt;| &quot;&gt; [1/50]&lt;/NOBR&gt;&lt;BR&gt;&lt;/td&gt;&lt;/tr&gt;" startspan --><!--#include file="../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="56926" --></tbody>
</table>

<hr>

<h3 ALIGN="center"><a href="JavaScript:;" onclick="window.top.close();"">Click
here to exit database</a></h3>

</body>

</html>

Kindest Regards SOG61
 
It is quite difficult to tell with so much autogenerated stuff. I'll load it into MSE and have a look. May take some time. LOoks like a lot of code.
 
xwb
Thanks again, I am very thankful that you have got me as far a you have, at least now most of the site is working I feel more like working to get everything up to date

I should imagine that if there was an error in there it would be in the early part. I spotted this bit in the middle and I wondered if that was something to do with it

The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");

All the best SOG61



 
I don't really know what is wrong with it. I can't load it into frontpage2000 because it keeps on modifying the script. That is one of the annoying bits of frontpage. Gets even worse if you use VML. One thing you could try

Open the script in frontpage make a minor mod (eg delete the h in html and put it back) then save the script. What frontpage will do is regenerate the code. Upload this and see what happens.

Another way of checking it is to look for a program called either mse.exe or mse7.exe. This program may or may not exist on your system. If it doesn't exist, open up frontpage, Tools/Macro/Microsoft Script Editor and it will get installed for you. Close Frontpage and try opening your script in the script editor. When I try this, it moans that there is a quote missing. Just wondering if you get the same problem.
 
xwb
Deleted one letter and saved, replaced letter as you suggested and saved file again, and loaded back to the web.
Found mse7.exe and opened file OK.

Went back to check the Website and EUREKA the page works OK, so once again many thanks for your perseverance with me and a job well done.

Kindest regards SOG61

and good luck with the Dancing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top