ASP Form not posting data.

T

Tim

I have a problem where some of my ASP forms are not posting data. I am using
Frontpage 2003 to create the forms and posting to an Access database. The
problem appears to be that the forms that are not working do not have the
section of code that starts with "' FP_ASP ASP Automatically generated by a
Frontpage Component. Do not Edit.". I try creating new forms and they do not
work and they are also missing the code.

I am posting to a 2003 Server with Frontpage 2002 Server Extensions loaded.
I am using Frontpage 2003.

When creating the form I do go to form properties, select send to a database
and select the existing database connection.

If I copy a form that already works, the "' FP_ASP ASP Automatically
generated by a Frontpage Component. Do not Edit." code is removed after I
copy the file.

Any assitance with this issue would be greatly appreciated.

Than you,
Tim
 
M

Mark Fitzpatrick

Tim,
Which file folder is the database in. Something that gets a lot of
people is that if the permissions on the database are off, then ASP won't
update or insert any data into it though you won't see an error. The IUSR
account, which is the anonymous internet user account, will need write
permissions to the database in order to save the updates. Sometimes this
account is missing permissions on an access database for some reason. Make
sure that the database is in the _fpdb folder as this folder "should" have
the correct permissions on it, and therefore every file within it.
 
T

Tim

Mark,

Thank you for responding. The DB is in the FPDB folder. I do not think it is
a premission issue because my other forms write data to the db. I have an
Operations folder on the website and the submit form in this folder works
great. If I copy the submit form to my Service folder the form will not work.

The code below resides in the forms that work and the forms that do not work
are missing this code. And if I copy the form that does work from Operations
to Service the code below is missing from the file in Service.

Thanks again,
Tim

<%
' 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("Webdata_ConnectionString")
FP_DumpError strErrorUrl, "Cannot open database"

fp_rs.Open "WebEntries", 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(15)
Dim arFormDBFields0(15)
Dim arFormValues0(15)

arFormFields0(0) = "SubmitBy"
arFormDBFields0(0) = "SubmittedBy"
arFormValues0(0) = Request("SubmitBy")
arFormFields0(1) = "KeyWords"
arFormDBFields0(1) = "KeyWords"
arFormValues0(1) = Request("KeyWords")
arFormFields0(2) = "EndDate"
arFormDBFields0(2) = "EndDate"
arFormValues0(2) = Request("EndDate")
arFormFields0(3) = "Title"
arFormDBFields0(3) = "Title"
arFormValues0(3) = Request("Title")
arFormFields0(4) = "Region"
arFormDBFields0(4) = "Region"
arFormValues0(4) = Request("Region")
arFormFields0(5) = "Department"
arFormDBFields0(5) = "Department"
arFormValues0(5) = Request("Department")
arFormFields0(6) = "StartDate"
arFormDBFields0(6) = "StartDate"
arFormValues0(6) = Request("StartDate")
arFormFields0(7) = "FunctionDoc"
arFormDBFields0(7) = "FunctionDocumentation"
arFormValues0(7) = Request("FunctionDoc")
arFormFields0(8) = "Link"
arFormDBFields0(8) = "Link"
arFormValues0(8) = Request("Link")
arFormFields0(9) = "FunctionInstruct"
arFormDBFields0(9) = "FunctionInst"
arFormValues0(9) = Request("FunctionInstruct")
arFormFields0(10) = "File"
arFormDBFields0(10) = "File"
arFormValues0(10) = Request("File")
arFormFields0(11) = "Team"
arFormDBFields0(11) = "Team"
arFormValues0(11) = Request("Team")
arFormFields0(12) = "FunctionProcedure"
arFormDBFields0(12) = "FunctionProcedure"
arFormValues0(12) = Request("FunctionProcedure")
arFormFields0(13) = "Description"
arFormDBFields0(13) = "Description"
arFormValues0(13) = Request("Description")
arFormFields0(14) = "Top10"
arFormDBFields0(14) = "Top10"
arFormValues0(14) = Request("Top10")

FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0


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:",_
"OperationsSubmit.asp",_
"Return to the form."

End If
End If

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

%>
 
K

Kathleen Anderson [MVP - FrontPage]

Tim:
Can you change the name of the Service folder to something else? I created a
folder in a web site once called manager and it caused all sorts of problems
because the web stats program used by the web host also used that name.

--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
 
T

Tim

Kathleen,

THank you for your response. I tried renaming the folder and I still have
the same problem. The server is a dedicated internal server. This is for an
intranet website. What is strange is that the forms/asp worked in the past.
We started to have the problem after someone loaded a subweb to the server. I
have reinstalled everythng except the OS. I hesitate to reload the OS this
time because I would hate to have to reload everything if this problem
happens again. Hopefully I can find the cause so I can address it directly.

THank you again for your assistance,
Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top