Passing and Setting a new Value
Hi
I'm having a lot of trouble setting a value in a database via ASP. MY ASP code was generated by Frontpage 2003, I have edited out all the comments and webbot code to get back to just Pure ASP code. The page was meant to collect the value ImageURL from the page input which works fine. I now want to pass in that value from another calling form....herein lies my problems
I am passing a value into this page in question Using the
?parameter=Value Method
But I cannot set the value in the database
I have included a code chunk look for teh bit in large red letters for context.
I have tried the following to no avail
arFormValues0(19) = ::ImageURL::
arFormValues0(19) = '::ImageURL::'
arFormValues0(19) = 'ImageURL'
Oh, this does not work either
arFormValues0(19) = "Hello world"
which I found rather alarming,
can you help?
Tammy
________________________________________
______Here is most of the code______
________________________________________
<%
On Error Resume Next
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("conn1_ConnectionString")
FP_DumpError strErrorUrl, "Cannot open database"
fp_rs.Open "TEACHERS", 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(20)
Dim arFormDBFields0(20)
Dim arFormValues0(20)
arFormFields0(17) = "Experience"
arFormDBFields0(17) = "Experience"
arFormValues0(17) = Request("Experience")
arFormFields0(18) = "Education"
arFormDBFields0(18) = "Education"
arFormValues0(18) = Request("Education")
arFormFields0(19) = "ImageURL"
arFormDBFields0(19) = "ImageURL"
arFormValues0(19) = Request("ImageURL")
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:",_
"ExplorerDetails.asp",_
"Return to the form.",_
arFormDBFields0,_
arFormValues0
End If
End If
%>
<form METHOD="POST" action="--WEBBOT-SELF--" name="FrontPage_Form1">
<input TYPE="hidden" NAME="VTI-GROUP" VALUE="0">
<%
%>
<table border="0" cellpadding="2" style="border-collapse: collapse" width="82%" id="table1" bgcolor="#DAD6E6">
<tr>
<td width="135" rowspan="21" valign="top">
<img border="0" src="../supportimages/explor2.jpg" width="199" height="427"></td>
<td valign="top" align="right" colspan="2">
<p align="justify"><i><b>
|