Solved

FrontPage and ASP - Help Needed Please!!

Posted on 2004-03-21
10
188 Views
Last Modified: 2013-12-24
Hi,

I am creating my first ASP page in FrontPage but when I try to preview it or run it I just get the following error:

<%
' FP_ASP ASP Automatically generated by a FrontPage Component. Do not Edit.

On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Err.Clear

strErrorUrl = ""

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
     Err.Clear

     Set fp_conn =  Server.CreateObject("ADODB.Connection")
     FP_DumpError strErrorUrl, "Cannot create connection"

     Set fp_rs = Server.CreateObject("ADODB.Recordset")
     FP_DumpError strErrorUrl, "Cannot create record set"

     fp_conn.Open Application("survey_ConnectionString")
     FP_DumpError strErrorUrl, "Cannot open database"

     fp_rs.Open "Results", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
     FP_DumpError strErrorUrl, "Cannot open record set"

     fp_rs.AddNew
     FP_DumpError strErrorUrl, "Cannot add new record set to the database"
     Dim arFormFields0(11)
     Dim arFormDBFields0(11)
     Dim arFormValues0(11)

     arFormFields0(0) = "Topic"
     arFormDBFields0(0) = "Topic"
     arFormValues0(0) = Request("Topic")
     arFormFields0(1) = "Name"
     arFormDBFields0(1) = "Name"
     arFormValues0(1) = Request("Name")
     arFormFields0(2) = "CourseTitle"
     arFormDBFields0(2) = "CourseTitle"
     arFormValues0(2) = Request("CourseTitle")
     arFormFields0(3) = "Choice"
     arFormDBFields0(3) = "Choice"
     arFormValues0(3) = Request("Choice")
     arFormFields0(4) = "Choice2"
     arFormDBFields0(4) = "Choice2"
     arFormValues0(4) = Request("Choice2")
     arFormFields0(5) = "Choice3"
     arFormDBFields0(5) = "Choice3"
     arFormValues0(5) = Request("Choice3")
     arFormFields0(6) = "Choice4"
     arFormDBFields0(6) = "Choice4"
     arFormValues0(6) = Request("Choice4")
     arFormFields0(7) = "Choice5"
     arFormDBFields0(7) = "Choice5"
     arFormValues0(7) = Request("Choice5")
     arFormFields0(8) = "Choice6"
     arFormDBFields0(8) = "Choice6"
     arFormValues0(8) = Request("Choice6")
     arFormFields0(9) = "Choice7"
     arFormDBFields0(9) = "Choice7"
     arFormValues0(9) = Request("Choice7")
     arFormFields0(10) = "Choice8"
     arFormDBFields0(10) = "Choice8"
     arFormValues0(10) = Request("Choice8")

     FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0


     fp_rs.Update
     FP_DumpError strErrorUrl, "Cannot update the database"

     fp_rs.Close
     fp_conn.Close

     FP_FormConfirmationFromArrays "text/html; charset=windows-1252",_
                              "Form Confirmation",_
                              "Thank you for submitting the following information:",_
                              "submission_form.asp",_
                              "Return to the form.",_
                              arFormDBFields0,_
                              arFormValues0

End If
End If

Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")

%>
<% Response.Buffer = True %>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Results -- New</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<!--mstheme--><link rel="stylesheet" type="text/css" href="../../../_themes/slate/slat1011.css"><meta name="Microsoft Theme" content="slate 1011">
</head>

<body>

<table width="100%" align=left>
  <tr>
    <td width="50%">
       <b><font size=+3 color="#000080"> Submission Form </font></b>
     </td>
    <td width="50%" align=right>
      <table>
        <tr>
          <td>
          <a href="../results_page.asp" target="_top">Results Page</a> |
Submission Form

          </td>
        </tr>
      </table>
     </td>
  </tr>
</table>


<p>
<br clear="all">
<hr>
<p>

<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.Name.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"Name\" field.");
    theForm.Name.focus();
    return (false);
  }

  if (theForm.CourseTitle.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"CourseTitle\" field.");
    theForm.CourseTitle.focus();
    return (false);
  }
  return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form METHOD="POST" action="submission_form.asp" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1" webbot-action="--WEBBOT-SELF--">

<!--webbot bot="SaveDatabase" SuggestedExt="asp" S-DataConnection="survey" S-RecordSource="Results"  S-Form-Fields="Topic Name CourseTitle Choice Choice2 Choice3 Choice4 Choice5 Choice6 Choice7 Choice8" S-Form-DBFields="Topic Name CourseTitle Choice Choice2 Choice3 Choice4 Choice5 Choice6 Choice7 Choice8 " B-UseDBFieldsForConfirmation="True" U-ASP-Include-Url="../../../_fpclass/fpdbform.inc" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="../../../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" i-checksum="52631" endspan -->

<p><b>Topic</b><br>
<select size="1" name="Topic">     <option value="Option 1">IT Facilities</option>
     <option value="Option 2">Library</option>
     <option value="Option 3">Canteen</option>
     <option value="Option 4">Learning Resource Centre</option>
     <option value="Option 5">Teaching Rooms</option>
</select>
<br>
</p>
<p><b>Name</b><br>
&nbsp;<!--webbot bot="Validation" s-display-name="Name" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Name" size="64" value="" maxlength="255"><br>
</p>
<p><b>Course Title</b><br>
&nbsp;<!--webbot bot="Validation" s-display-name="CourseTitle" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="CourseTitle" size="64" value="" maxlength="255"><br>
</p>
<p><b>The Facilities that are available are:</b><br>
<p><input type="radio" name="Choice" value=1 >Of a Very High standard</p>
<p><input type="radio" name="Choice" value=2 >Of a Good Standard</p>
<p><input type="radio" name="Choice" value=3 >Average</p>
<p><input type="radio" name="Choice" value=4 >Of a Below Average Standard</p>
<br>
<b>Do you think that the resources available are helpful?</b><br>
<p><input type="radio" name="Choice2" value=1 >Yes</p>
<p><input type="radio" name="Choice2" value=2 >No</p>
<p><input type="radio" name="Choice2" value=3 >Decline to say</p>
<br>
<b>The Condition of the equipment provided is:</b><br>
<p><input type="radio" name="Choice3" value=1 >Good</p>
<p><input type="radio" name="Choice3" value=2 >Acceptable</p>
<p><input type="radio" name="Choice3" value=3 >Average</p>
<p><input type="radio" name="Choice3" value=4 >Poor</p>
<br>
<b>&nbsp;Have you ever been unable to use the equipment provided in any way?</b><br>
<p><input type="radio" name="Choice4" value=1 >Yes</p>
<p><input type="radio" name="Choice4" value=2 >No</p>
&nbsp;<p><b>Have you ever had to report the equipment for being faulty?<u><br>
</u></b><br>
<input type="radio" name="Choice5" value=1 >Yes</p>
<p><input type="radio" name="Choice5" value=2 >No</p>
<p>&nbsp;</p>
<p><b>&nbsp;Has there ever been a time when the resources or equipment were
unavailable for use?</b><br>
</p>
<p><input type="radio" name="Choice6" value=1 >Yes</p>
<p><input type="radio" name="Choice6" value=2 >No</p>
<p>&nbsp;</p>
<p><b>If improvements were to be made, what area would you concentrate on?</b><br>
</p>
<p><input type="radio" name="Choice7" value=1 >Aesthetics</p>
<p><input type="radio" name="Choice7" value=2 >Facilities</p>
<p><input type="radio" name="Choice7" value=3 >Resources</p>
<p><input type="radio" name="Choice7" value=4 >Technology</p>
<br>
</p>
<p><b>Your overall opinion of the College as a whole can be described as:</b><br>
<p><input type="radio" name="Choice8" value=1 >Very Pleased</p>
<p><input type="radio" name="Choice8" value=2 >Pleased</p>
<p><input type="radio" name="Choice8" value=3 >Acceptable</p>
<p><input type="radio" name="Choice8" value=4 >Terrible</p>
<p>&nbsp;</p>
<p>If you have any additional comments, please enter them here <b>- <u>Thanks
for participating!!</u></b></p>
<textarea rows="2" name="S1" cols="97"></textarea><br>
</p>


<p><input type="submit" value="    OK    "><input type="reset" value=" Reset "></p>

</form>

</body>

</html>

And my page doesn't load, how do I get to load it and test it?.  My page is a survey with a Main Page that links to the Submissions Page and Results page, the aforementioned error is given when I try to either access the Submissions page or when I preview it in FrontPage (enter data and then click 'Ok'), when previewing in FrontPage it also gives a script error saying that an object is expected.

Any help would be greatly appreciated as I have never done ASP before.  

Thanks,

Ian

0
Comment
Question by:Ianwuk
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 31

Expert Comment

by:seanpowell
ID: 10644834
Just 2 initial thoughts...

1. The page needs an asp extension

2. You need to preview this in your browser at:

http://localhost/your web name/some folder/submission.asp

You can't preview generated database code in FrontPage's preview screen - that is only for previewing layout.

You need to view the page in the browser...

Thanks,
Sean

0
 

Author Comment

by:Ianwuk
ID: 10645214
Hi,

I currently have the main page called 'Survey.html', I uploaded that and ran it, it loaded the Main Page fine (as in published onto the Internet) but when I clicked the Submissions link it gave the error mentioned, should the main page be called 'Survey.asp'?.

Thanks very much for your help.

Ian
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 10645307
Yes - any page that has asp code in it needs to have the asp extension to function correctly.

Thanks,
Sean
0
 

Author Comment

by:Ianwuk
ID: 10645502
Hi,

How do you save a page with an ASP extension within FrontPage as it is not listed under the File Type options.  I have tried renaming it through Windows and I then uploaded it but despite loading the Main Page I can't seem to access the Submission Page which is what I want to start with.

The path is correct but it just says file not found, you can see for yourself at:

http://www.eyewerks.com/eyewerks%20v2/survey.asp

Thanks for your continuing support, it is much appreciated
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Ianwuk
ID: 10645508
Okay, it doesn't say 'File not Found' as such, just brings up the error previously mentioned, why is it not working?.

Thanks for your time and expertise!.

Ian
0
 
LVL 19

Expert Comment

by:webwoman
ID: 10735420
What kind of server do you have? If it's NOT Windows running IIS, it's very possible that ASP WILL NOT WORK AT ALL.

Find out.
0
 

Expert Comment

by:ryujingt3
ID: 10735626
Hi,

Currently I have no server, it is a College project that I am working, my PC is running Windows XP Home that does not support IIS so I cannot test my site.  But I have heard of server software that can emulate a server, does anyone know of a program that will allow me to run my ASP page that I created in FP?.

Thanks
0
 

Expert Comment

by:ryujingt3
ID: 10735631
Hi, sorry for the confusion, I realised I had two accounts, one was made before the site was overhauled.  Thanks for your input.
0
 
LVL 29

Accepted Solution

by:
coreybryant earned 0 total points
ID: 11689882
Force Accept

coreybryant
FrontPage Page Editor
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now