navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Free FrontPage Templates

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

please help with the simplest problem

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> please help with the simplest problem
Page: [1]
 
ae4444

 

Posts: 10
Joined: 3/21/2007
Status: offline

 
please help with the simplest problem - 3/21/2007 9:20:16   
Hello there --

Hoping someone can help fix a very simple, seemingly silly problem.

I want to set up an FrontPage form and have it deliver the responses to a database. All very straightforward one might think.

So, first step - I've created the form, renamed the HTML file to ASP - and with the default setting of 'send to filename' under form properties the form displays as it shouldin IE6. No problem with the form then.

A problem only occurs when I go back to form properties, change it to 'send to database', create the database, set the results table etc and then preview the form -- at which point the form doesn't display as it should. What is displayed is the following code:


====================

<%
' 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
Session.LCID = 1033
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("index_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(7)
Dim arFormDBFields0(7)
Dim arFormValues0(7)

arFormFields0(0) = "Contact_Organization"
arFormDBFields0(0) = "Contact_Organization"
arFormValues0(0) = Request("Contact_Organization")
arFormFields0(1) = "Contact_Title"
arFormDBFields0(1) = "Contact_Title"
arFormValues0(1) = Request("Contact_Title")
arFormFields0(2) = "Contact_FullName"
arFormDBFields0(2) = "Contact_FullName"
arFormValues0(2) = Request("Contact_FullName")
arFormFields0(3) = "Contact_Email"
arFormDBFields0(3) = "Contact_Email"
arFormValues0(3) = Request("Contact_Email")
arFormFields0(4) = "Contact_FAX"
arFormDBFields0(4) = "Contact_FAX"
arFormValues0(4) = Request("Contact_FAX")
arFormFields0(5) = "Contact_WorkPhone"
arFormDBFields0(5) = "Contact_WorkPhone"
arFormValues0(5) = Request("Contact_WorkPhone")
arFormFields0(6) = "Contact_URL"
arFormDBFields0(6) = "Contact_URL"
arFormValues0(6) = Request("Contact_URL")

FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0

If Request.ServerVariables("REMOTE_HOST") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"), "Remote_computer_name"
End If
If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"), "Browser_type"
End If
FP_SaveFieldToDB fp_rs, Now, "Timestamp"
If Request.ServerVariables("REMOTE_USER") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "User_name"
End If

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

fp_rs.Close
fp_conn.Close

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

End If
End If

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

%>
<HTML>
<HEAD>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<TITLE>New Page 2</TITLE>
</HEAD>
<BODY>
<H1>New Page 2</H1>
<HR>
<P>
This is an explanation of the purpose of the form ...</P>
<FORM METHOD="POST" ACTION="index.asp" webbot-action="--WEBBOT-SELF--">
<!--WEBBOT BOT=SaveDatabase SuggestedExt="asp" S-DataConnection="index" S-RecordSource="Results" U-Database-URL="fpdb/index.mdb" S-Builtin-Fields="REMOTE_HOST HTTP_USER_AGENT Timestamp REMOTE_USER" S-Builtin-DBFields="Remote_computer_name Browser_type Timestamp User_name" S-Form-Fields="Contact_Organization Contact_Title Contact_FullName Contact_Email Contact_FAX Contact_WorkPhone Contact_URL" S-Form-DBFields="Contact_Organization Contact_Title Contact_FullName Contact_Email Contact_FAX Contact_WorkPhone Contact_URL" 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="40548" endspan --><P>
Please provide the following contact information:</P>
<BLOCKQUOTE>
<TABLE>
<TR>
<TD ALIGN="right">
<EM>Name</EM></TD>
<TD>
<INPUT TYPE=TEXT NAME="Contact_FullName" SIZE=35>
</TD>
</TR>
<TR>
<TD ALIGN="right">
<EM>Title</EM></TD>
<TD>
<INPUT TYPE=TEXT NAME="Contact_Title" SIZE=35>
</TD>
</TR>
<TR>
<TD ALIGN="right">
<EM>Organization</EM></TD>
<TD>
<INPUT TYPE=TEXT NAME="Contact_Organization" SIZE=35>
</TD>
</TR>
<TR>
<TD ALIGN="right">
<EM>Work Phone</EM></TD>
<TD>
<INPUT TYPE=TEXT NAME="Contact_WorkPhone" SIZE=25 MAXLENGTH=25>
</TD>
</TR>
<TR>
<TD ALIGN="right">
<EM>FAX</EM></TD>
<TD>
<INPUT TYPE=TEXT NAME="Contact_FAX" SIZE=25 MAXLENGTH=25>
</TD>
</TR>
<TR>
<TD ALIGN="right">
<EM>E-mail</EM></TD>
<TD>
<INPUT TYPE=TEXT NAME="Contact_Email" SIZE=25>
</TD>
</TR>
<TR>
<TD ALIGN="right">
<EM>URL</EM></TD>
<TD>
<INPUT TYPE=TEXT NAME="Contact_URL" SIZE=25 MAXLENGTH=25>
</TD>
</TR>
</TABLE>
</BLOCKQUOTE>
<INPUT TYPE=SUBMIT VALUE="Submit Form">
<INPUT TYPE=RESET VALUE="Reset Form">
</FORM>
<HR>
<H5>
Author information goes here.<br>Copyright © 2003 [OrganizationName]. All rights reserved. <BR>
Revised: <!--WEBBOT BOT=TimeStamp
S-Type="EDITED"
S-Format="%m/%d/%y" startspan
-->03/21/07<!--webbot bot="TimeStamp" i-checksum="13138" endspan --></H5>
</BODY>
</HTML>



====================


It's that simple - the form's fine, but it won't display correctly when I set it to send to a database!? The same problem occurs whether I view it on my PC or upload it to the web server.

Any ideas?
Thanks ahead
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 9:36:09   
Welcome to the forums!
When you say it doesnt display, how does it look? or is there an error?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to ae4444)
ae4444

 

Posts: 10
Joined: 3/21/2007
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 9:46:25   
thanks for the quick reply.

no, I wish there was an error, that would simplify things - but nothing - just a page of source code.

there should be a form - with text boxes and submit button etc. - but no html at all - just the code.

if I change back to 'send to filename' the form reappears and the page looks just as it should!?
I don't get it. Clearly some setting is wrong, somewhere, but I can't imagine what. As far as I can tell this an integral feature in FrontPage which I just haven't used until now, so there shouldn't be any chance of it failing - but it does.

Cheers

(in reply to Spooky)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 9:49:42   
When you say "source code" do you see html code in normal page view?
Does your web server support asp?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to ae4444)
Mike54

 

Posts: 4791
Joined: 3/26/2001
From: Way Up Over
Status: online

 
RE: please help with the simplest problem - 3/21/2007 9:56:01   
With your site open if you click on Tools > Site Settings and open the Database tab does the dB you created show and is it indicated that it has been verified? (green checkmark)

_____________________________

Who was the first guy that looked at a cow and said, "I think that I'll drink whatever comes out of those things when I squeeze them"?

New photogalleries, stop by sometime.

(in reply to ae4444)
ae4444

 

Posts: 10
Joined: 3/21/2007
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 10:10:22   
Thanks both.

Problem solved! My DB was listed but had a question mark beside it -- I clicked verify and up came the tick mark. The form now displays as per normal!

(in reply to Mike54)
ae4444

 

Posts: 10
Joined: 3/21/2007
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 10:18:09   
Sorry - I'm a dummy, I take that back - problem not solved.
The green tick mark is now there - DB verified - but the form still doesn't display the form.
It was set to 'send to filename' rather than 'send to DB' when I tested it.

And, yes, my web server has FrontPage extensions installed, so that shouldn't be the issue.

The source code I spoke of was part of my first post on the topic.

Any more ideas?
Cheers

(in reply to ae4444)
Mike54

 

Posts: 4791
Joined: 3/26/2001
From: Way Up Over
Status: online

 
RE: please help with the simplest problem - 3/21/2007 10:39:26   
Open the form, right click on one of the form fields and select "Form Properties". Assuming that "Send to database" is selected click on the option button and the bottom of the dialog box. Is there a database connection indicated and is it the correct one for your form? If not select one (the correct one). Also make sure that there is a table indicated to take the form results.
Let us know what you find.

_____________________________

Who was the first guy that looked at a cow and said, "I think that I'll drink whatever comes out of those things when I squeeze them"?

New photogalleries, stop by sometime.

(in reply to ae4444)
ae4444

 

Posts: 10
Joined: 3/21/2007
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 10:47:27   
yep, did that. no problem there - the DB is there, and a table is selected. I created a new DB for the form (with create database) so Frontpage put the DB in place for me - difficult to get that wrong.

Cheers

(in reply to Mike54)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 10:47:47   
Is the page on the web that we can view?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to Mike54)
ae4444

 

Posts: 10
Joined: 3/21/2007
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 10:49:37   
yes - http://www.mangosee.com/test/index.asp

Cheers

(in reply to Spooky)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 10:52:47   
Apache/1.3.33 Server at mangosee.com Port 80

Your server doesnt support asp - this is required for running the database functions.
Unless you change servers, you can only look at some other form of scripting such as php

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to ae4444)
ae4444

 

Posts: 10
Joined: 3/21/2007
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 11:01:55   
more ignorance on my part perhaps - but I'm confused for 2 reasons --

1 - my server supposedly installs frontpage extensions to allow me to use these kind of features.

2 - what does my web server have to do with a form not displaying when I'm simply previewinig a form on my PC? Surely it's irrelavant at that point.

(in reply to Spooky)
ae4444

 

Posts: 10
Joined: 3/21/2007
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 11:09:11   
Just checked - my server (ipowerweb) does indeed support ASP. So that can't be a problem.

Cheers

(in reply to ae4444)
Mike54

 

Posts: 4791
Joined: 3/26/2001
From: Way Up Over
Status: online

 
RE: please help with the simplest problem - 3/21/2007 11:45:32   
I don't believe it's anything to do with the source on the page. I just copied your page and pasted it new into FP then removed the asp from it. That resulted in a form with no ties which I used to create a database. Verified the dB, and set the form to connect with it, saved as asp and pulled up in my browser fine. Just to make sure there wasn't some little thing wrong in the asp from your page that I might have stripped out I copied it again, pasted into FP new saved as asp and connected to the dB created by the first form. Again it worked just fine.
There doesn't seem to be problem with the form itself just the ability to run the script...

_____________________________

Who was the first guy that looked at a cow and said, "I think that I'll drink whatever comes out of those things when I squeeze them"?

New photogalleries, stop by sometime.

(in reply to ae4444)
ae4444

 

Posts: 10
Joined: 3/21/2007
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 11:57:30   
That's what I thought - the only bit I know about this - the form seems to be fine. Thanks for proving it.
The create database procedure seems to creates all the essentail components to get things working - but it just doesn't want to work.

Unrelated to a degree - but illustrating that I don't have a perfect FrontPage set up (recently installed though) - is that FrontPage crashes when I try to saye my DWT template fiile! It was doing it a while back, I've since reinstalled the OS and all programs and it's still doing it - my best guess here is that it's due to one or other SP2 hotfix since it's a new issue that cropped up a few months back. I haven't found a solution so just live with this - the DWT saves my changes before crashing, then I have to manually update the pages attached to it from Format > Update All Pages. So, it doesn't completely surprise me that I have a new nonsensical FrontPage issue. It's annoying though cos I really want to get the forms 2 DB set up working and I don't know enough to dig into why its failing - that's why I use FP. it's generally pretty easy, and works well but not today.

Cheers

(in reply to Mike54)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 12:03:26   
Youll need to check your plan supports asp - Now the server is definitely running Apache which is a big black mark.
Apache can run asp however Im not sure that is the case in your instance.

An easy way would be to create a simple asp page like so :

<%Response.write "hello world" %>

Does it work as expected and just write hello world ?
If not - ask your host what the deal is with running asp on your plan

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to ae4444)
ae4444

 

Posts: 10
Joined: 3/21/2007
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 12:27:06   
You're right - the ASP doesn't display correctly. Thanks for clearing that up.
FrontPage extentions clearly don't equal full ASP support.
Sorry to be a pain and pretty clueless here, but one reaon I use FP is that it's pretty easy and I don't have the time to get clued up - to me Apache has more to do with General Custer than my website - so I try to keep things as simple as possible.

Still doesn't explain why the ASP doesn't display on my machine (direct from FP, preview) does it? Should I be able to see the ASP when I preview the test page in the browser? I can't as it happens - I type the asp code into the page and when previewed it comes up blank!?

(in reply to Spooky)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: please help with the simplest problem - 3/21/2007 12:42:36   
Asp needs to be run via a web server (preferably windows / IIS) before its displayed correctly.
The preview window doesnt display correctly at the best of times, and all testing should be done in a browser.
The extensions are used to a certain degree, but requires full asp support to actually work

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to ae4444)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> please help with the simplest problem
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts