Forums

ASP

This topic is locked

Need some help re ASP pages that are not working

Posted 06 Mar 2003 04:44:32
1
has voted
06 Mar 2003 04:44:32 h b posted:
evening all,

I could use some help with some pages that are not working for me. As in getting "The page cannot be displayed" errors. Site is www.focusdesign.com/york/index.asp
Pages not working are www.focusdesign.com/york/employee_directory/directory_dept.asp and more in that folder. Code of one of those pages below.

Odd thing is that I developed them locally using PWS and DW MX and all was well. I uploaded pages to server (myhosting.com is host) and all get the same error. All the pages on the site are ASP pages so that alone is not the issue.

I'm sure this is an error that may well be obvious but I'm not seeing it. I'm fairly new with ASP so bear with me. Any help is appreciated. Thanks, Bob H

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../../Connections/employees.asp" -->
<%
' *** Edit Operations: declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")
If (Request.QueryString <> "" Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Update Record: set variables

If (CStr(Request("MM_update") = "form1" And CStr(Request("MM_recordId") <> "" Then

MM_editConnection = MM_employees_STRING
MM_editTable = "Contacts"
MM_editColumn = "ID"
MM_recordId = "" + Request.Form("MM_recordId" + ""
MM_editRedirectUrl = "directory_employee.asp"
MM_fieldsStr = "LastName|value|FirstName|value|Department|value|BusinessPhone|value"
MM_columnsStr = "LastName|',none,''|FirstName|',none,''|Department|',none,''|BusinessPhone|',none,''"

' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|"
MM_columns = Split(MM_columnsStr, "|"

' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next

' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "" Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "" Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If

End If
%>
<%
' *** Delete Record: declare variables

if (CStr(Request("MM_delete") = "form2" And CStr(Request("MM_recordId") <> "" Then

MM_editConnection = MM_employees_STRING
MM_editTable = "Contacts"
MM_editColumn = "ID"
MM_recordId = "" + Request.Form("MM_recordId" + ""
MM_editRedirectUrl = "masterdetails_update.asp"

' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "" Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "" Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If

End If
%>
<%
' *** Update Record: construct a sql update statement and execute it

If (CStr(Request("MM_update") <> "" And CStr(Request("MM_recordId") <> "" Then

' create the sql update statement
MM_editQuery = "update " & MM_editTable & " set "
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),","
MM_delim = MM_typeArray(0)
If (MM_delim = "none" Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none" Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none" Then MM_emptyVal = ""
If (MM_formVal = "" Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "" Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'" Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''" & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_editQuery = MM_editQuery & ","
End If
MM_editQuery = MM_editQuery & MM_columns(MM_i) & " = " & MM_formVal
Next
MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId

If (Not MM_abortEdit) Then
' execute the update
Set MM_editCmd = Server.CreateObject("ADODB.Command"
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl <> "" Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

End If
%>
<%
' *** Delete Record: construct a sql delete statement and execute it

If (CStr(Request("MM_delete") <> "" And CStr(Request("MM_recordId") <> "" Then

' create the sql delete statement
MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " = " & MM_recordId

If (Not MM_abortEdit) Then
' execute the delete
Set MM_editCmd = Server.CreateObject("ADODB.Command"
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl <> "" Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

End If
%>

<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("ID" <> "" Then
Recordset1__MMColParam = Request.QueryString("ID"
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset"
Recordset1.ActiveConnection = MM_employees_STRING
Recordset1.Source = "SELECT ID, FirstName, LastName, Department, BusinessPhone FROM Contacts WHERE ID = " + Replace(Recordset1__MMColParam, "'", "''" + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<HTML ><HEAD>
<TITLE>York Hospital Intranet</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META http-equiv=Content-Language content=en-us>
<META content="MSHTML 6.00.2713.1100" name=GENERATOR>
<script language="JavaScript" type="text/JavaScript">function mmLoadMenus() {
if (window.mm_menu_0214085003_0) return;
window.mm_menu_0214085003_0 = new Menu("root",87,16,"Verdana, Arial, Helvetica, sans-serif",10,"#333399","#FFFFFF","#CCCCCC","#339999","left","middle",3,0,200,-5,7,true,true,true,1,true,true);
mm_menu_0214085003_0.addMenuItem("New Item";
mm_menu_0214085003_0.fontWeight="bold";
mm_menu_0214085003_0.hideOnMouseOut=true;
mm_menu_0214085003_0.bgColor='#999999';
mm_menu_0214085003_0.menuBorder=1;
mm_menu_0214085003_0.menuLiteBgColor='#999999';
mm_menu_0214085003_0.menuBorderBgColor='#999999';

window.mm_menu_0214085028_0 = new Menu("root",83,16,"Verdana, Arial, Helvetica, sans-serif",10,"#333399","#FFFFFF","#CCCCCC","#8D8D8D","left","middle",3,0,200,-5,7,true,true,true,1,true,true);
mm_menu_0214085028_0.addMenuItem("Overview","location='../is/index.asp'";
mm_menu_0214085028_0.addMenuItem("FAQ","location='../is/docs/faq.asp'";
mm_menu_0214085028_0.addMenuItem("Forms","location='../is/docs/forms.asp'";
mm_menu_0214085028_0.addMenuItem("IS Techs","location='../is/login/login.asp'";
mm_menu_0214085028_0.fontWeight="bold";
mm_menu_0214085028_0.hideOnMouseOut=true;
mm_menu_0214085028_0.bgColor='#999999';
mm_menu_0214085028_0.menuBorder=1;
mm_menu_0214085028_0.menuLiteBgColor='#999999';
mm_menu_0214085028_0.menuBorderBgColor='#999999';

mm_menu_0214085028_0.writeMenus();
} // mmLoadMenus()
<!--




function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape"&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<link href="../css/css.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../staffservices/docs/mm_menu.js"></script>
</HEAD>
<BODY bgcolor="E5E5DC" leftMargin=0 topMargin=0 rightMargin=0 bottomMargin=0
marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td colspan="3" valign="top" background="../images/office_bg_old.gif" bgcolor="#5B92C8"><p><a name="top" onFocus="if(this.blur)this.blur()"></a>
<script language="JavaScript1.2">mmLoadMenus();</script>
</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="105" valign="middle" class="topwhite"><div align="center"><img src="../images/yh.gif" width="35" height="65"></div></td>
<td valign="middle" class="topwhite"><img src="../images/york_text.gif"></td>
<td valign="bottom"><div align="right">
<p> </p>
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td width="30" background="../images/text/back_row_19.gif" bgcolor="#666666"> </td>
<td width="866" valign="bottom" background="../images/text/back_row_19.gif" bgcolor="#666666">
<TABLE WIDTH=122 height="18" BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR valign="bottom">
<TD valign="bottom"><a href="../index.asp"><img src="../images/nav/home_off.gif" width="71" height="18" border="0"></a></TD>
<TD valign="bottom"><img src="../images/nav/ss_on.gif" width="132" height="18"></TD>
<TD><a href="../is/index.asp" onMouseOver="MM_showMenu(window.mm_menu_0214085028_0,1,18,null,'image1')" onMouseOut="MM_startTimeout();"><img src="../images/nav/is_off.gif" name="image1" width="179" height="18" border="0" id="image1"></a></TD>
</TR>
</TABLE></td>
<td width="125" background="../images/text/back_row_19.gif" bgcolor="#666666"> </td>
</tr>
<tr>
<td height="10" bgcolor="#999999"> </td>
<td height="7" colspan="2" valign="bottom" bgcolor="#999999"><img src="../images/spacer.gif" width="5" height="7">
</td>
</tr>

</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr bgcolor="#666666">
<td height="1" colspan="6"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td width="30" valign="top" background="../images/left_bk.gif" bgcolor="#5B92C8"><p><img src="../images/spacer.gif" width="1" height="1">
</p>
<table width="105" border="0" cellpadding="2" cellspacing="1" bgcolor="#666666">
<tr bgcolor="#666666">
<td height="18" background="../images/gray.gif" bgcolor="#8A8A8A" class="homelink" ><a href="#" class="homelink" onFocus="if(this.blur)this.blur()"> · </a><a href="../staffservices/index.asp" class="homelink" onFocus="if(this.blur)this.blur()">Overview</a></td>
</tr>
<tr bgcolor="#666666">
<td background="../images/gray.gif" bgcolor="#8A8A8A" class="homelink" ><a href="#" class="homelink" onFocus="if(this.blur)this.blur()"> · </a><a href="../staffservices/docs/faq.asp" class="homelink" onFocus="if(this.blur)this.blur()">FAQ</a></td>
</tr>
<tr bgcolor="#666666">
<td background="../images/gray.gif" bgcolor="#8A8A8A" class="homelink" ><a href="#" class="homelink" onFocus="if(this.blur)this.blur()"> · </a><a href="../staffservices/docs/forms.asp" class="homelink" onFocus="if(this.blur)this.blur()">Forms</a></td>
</tr>
<tr bgcolor="#666666">
<td background="../images/gray.gif" bgcolor="#8A8A8A" class="homelink" ><a href="#" class="homelink" onFocus="if(this.blur)this.blur()"> · </a><a href="../staffservices/newsletter/index.asp" class="homelink" onFocus="if(this.blur)this.blur()">Newsletter</a></td>
</tr>
<tr bgcolor="#666666">
<td height="18" background="../images/gray.gif" bgcolor="#8A8A8A" class="homelink" ><a href="#" class="homelink" onFocus="if(this.blur)this.blur()"> · </a><a href="../staffservices/docs/benefits.asp" class="homelink" onFocus="if(this.blur)this.blur()">Benefits</a></td>
</tr>
<tr>
<td height="31" background="../images/gray.gif" bgcolor="#FFFFFF" ><a href="directory_dept.asp" class="homelink" onFocus="if(this.blur)this.blur()"> · Department<br>
   Directory </a></td>
</tr>
<tr>
<td height="31" background="../images/gray.gif" bgcolor="#FFFFFF" ><a href="directory_employee.asp" class="homelink" onFocus="if(this.blur)this.blur()"> · Employee<br>
   Directory </a></td>
</tr>
</table>
<p> </p>
<p> </p></td>
<td><br>
<table width="96%" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td width="856"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="75"><img src="../images/text/admin_empldir.gif" width="455" height="22"></td>
<td class="bodysmall"><div align="right"><%= FormatDateTime(Date, 1) %>
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td> <p><span class="bold16">Main Update Page</span></p>
<p class="body"><br>
You can add an new employee's contact information, edit existing
information or delete an employee from the hospital Employee
Directory in this admin section.</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="body"> <table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="006699">
<tr>
<td class="bodyboldw">Add a New Employee's Contact
Information to the Directory</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" class="body"><br>
To add a new employee's contact information <a href="edit.asp" class="bodybold">please
click here</a>. <br> <br> </td>
</tr>
<tr>
<td class="bodyboldw">How to Edit or Delete Existing
Employee Information in Directory</td>
</tr>
</table>
<p class="bodybold">Instructions:</p>
<ul>
<li>First select and click on the employee you wish
to edit or delete from this <a href="masterdetails_update.asp" class="bodybold">Update
Employee Directory</a> (it will look exactly like
the main directory except there will be links attached
to the Last Name).</li>
<li>This will bring you back to this page. Follow below
to edit or delete employee contact information.</li>
<li>Any questions contact....</li>
</ul>
<table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="006699">
<tr>
<td bgcolor="#E1E1C4" class="bodybold">Edit Existing
Employee Information in Directory</td>
</tr>
</table>
<ul>
<li>This form will allow you to edit existing employee
contact information to the Employee Directory. </li>
<li>Please make any changes to their information in
the the areas below and click the "Update Info"
button.

</li>
</ul></td>
</tr>
</table>
<form method="POST" action="<%=MM_editAction%>" name="form1">
<table width="291" border="0" cellpadding="2" cellspacing="0">
<tr valign="baseline">
<td width="117" align="right" nowrap class="bodybold">LastName:</td>
<td width="166"> <input name="LastName" type="text" class="formback" value="<%=(Recordset1.Fields.Item("LastName".Value)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td align="right" nowrap class="bodybold">FirstName:</td>
<td> <input name="FirstName" type="text" class="formback" value="<%=(Recordset1.Fields.Item("FirstName".Value)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td align="right" nowrap class="bodybold">Department:</td>
<td> <input name="Department" type="text" class="formback" value="<%=(Recordset1.Fields.Item("Department".Value)%>" size="32"></td>
</tr>
<tr valign="baseline">
<td align="right" nowrap class="bodybold">Extension:</td>
<td> <input name="BusinessPhone" type="text" class="formback" value="<%=(Recordset1.Fields.Item("BusinessPhone".Value)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td width="14" align="right" nowrap> </td>
<td> <br> <input name="submit" type="submit" class="body11" value="Update Info">
</td>
</tr>
</table>
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="MM_recordId" value="<%= Recordset1.Fields.Item("ID".Value %>">
<input type="hidden" name="MM_recordId2" value="<%= Recordset1.Fields.Item("ID".Value %>">
</form>
<br> <table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="006699">
<tr>
<td bgcolor="#E1E1C4" class="bodybold">Delete Existing Employee
from Directory</td>
</tr>
</table>
<ul class="body">
Click the "Delete Employee" button when you want
to delete the employee chosen above from the <a href="masterdetails_update.asp" class="bodybold">Update
Employee Directory</a> whose info is in the form above.
</ul>
<form ACTION="<%=MM_editAction%>" METHOD="POST" name="form2">
<table width="291" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="117"> </td>
<td> <input name="Submit" type="submit" class="body11" value="Delete Employee "></td>
</tr>
</table>
<input type="hidden" name="MM_delete" value="form2">
<input type="hidden" name="MM_recordId" value="<%= Recordset1.Fields.Item("ID".Value %>">
</form></td>
</tr>
</table>
<table width="96%" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td><div align="right"><a href="#top" onFocus="if(this.blur)this.blur()"><img src="../images/backtotop_button.gif" width="16" height="20" border="0"></a></div></td>
</tr>
<tr>
<td><table width="99%" height="1" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="744" height="5" background="../images/dotted_line.gif"><img src="file:///C|/Client%20sites/projectsite/spacer.gif" width="3" height="1"></td>
</tr>
</table>
<p class="bodysmall">All rights reserved © 2003 York
Hospital </p></td>
</tr>
</table></td>
<td width="125" valign="top" background="../../images/right_grey.gif" bgcolor="#CCCCCC"><p><img src="../images/spacer.gif" width="1" height="1"><br>
<br>
<br>
</p>
<table width="95%" border="0" align="right" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td><TABLE
width=100% border=0 align="center" cellPadding=3 cellSpacing=0 bgcolor="#FFFFFF">
<TBODY>
<TR bgcolor="#cc6666">
<TD vAlign=top class="bodysmall"> </TD>
<TD vAlign=middle class="bodyboldw">Important</TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD width="1" vAlign=top class="bodysmall"><span class="smallbold"><img src="../../images/bulletK.gif" width="8" height="6" vspace="4"></span><span class="smallbold"></span></TD>
<TD width="145" vAlign=top class="bodysmall"><p> <span class="smallbold">
New Services <br>
</span><span class="bodysmall">New employee educational
benefit offered...<a href="../../docs/solutions/solutions/network.htm" onFocus="if(this.blur)this.blur()"><br>
</a></span><span class="smallbold"> <br>
</span></p></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
<tr>
<td><TABLE
width=100% border=0 align="center" cellPadding=3 cellSpacing=0 bgcolor="#FFFFFF">
<TBODY>
<TR bgcolor="#FFFFFF">
<TD vAlign=top class="bodysmall"><span class="smallbold"><img src="../../images/bulletK.gif" width="8" height="6" vspace="4"></span><span class="smallbold"></span></TD>
<TD vAlign=top class="bodysmall"><p> <span class="smallbold">
New Services <br>
</span><span class="bodysmall">New employee educational
benefit offered...<a href="../../docs/solutions/solutions/network.htm" onFocus="if(this.blur)this.blur()"><br>
</a></span><span class="smallbold"> <br>
</span></p></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
</table>
<p></p>
<p>  </p>
<br> </td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="../images/back_menu.gif"> </td>
</tr>
</table>
</BODY></HTML>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>

Replies

Replied 06 Mar 2003 13:15:32
06 Mar 2003 13:15:32 Yoshimi Yoshimi replied:
Hi,

try turning off the "show friendly error messages" in the advanced options of your browser (if you are using IE). Then you will see this message:

The include file '../../Connections/employees.asp' was not found.

check that you have the path correct.
Replied 06 Mar 2003 17:34:29
06 Mar 2003 17:34:29 h b replied:
Thanks, Yoshimi, for your help. Is working now..some other tweaks need to happen but the path was incorrect was the issue Thanks again.

Bob

Reply to this topic