HELP > Displaying form values before insertin

Results 1 to 2 of 2

Thread: HELP > Displaying form values before insertin

  1. #1
    Join Date
    Dec 1969

    Default HELP > Displaying form values before insertin

    &#060;B&#062;Hello, <BR>I&#039;m not an ASP developer, but have a FrontPg &#039;00 form sending data to a SQL Serv. db. As of right now I have the Form running without error on submit, on IIS. My "confirm" page is showing text box names rather than values entered into the text boxes. And upon querying the db, nothing has been entered. Can anyone help me maybe pop up a box that shows, upon submit, the values that of the text boxes? or maybe the insert statement that "should" be executing?<BR><BR>Thanks for any help!! PLEASE! &#060;B&#062;<BR><BR>--code<BR><BR>&#060;%<BR>&#039; FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit.<BR>On Error Resume Next<BR><BR>strErrorUrl = ""<BR><BR>If Request.ServerVariables("REQUEST_METHOD") = "POST" Then<BR>If Request.Form("VTI-GROUP") = "0" Then<BR> Err.Clear<BR><BR> Set fp_conn = Server.CreateObject("ADODB.Connection")<BR> FP_DumpError strErrorUrl, "Cannot create connection"<BR><BR> Set fp_rs = Server.CreateObject("ADODB.Recordset")<BR> FP_DumpError strErrorUrl, "Cannot create record set"<BR><BR> fp_conn.Open Application("ELA_ConnectionString")<BR> FP_DumpError strErrorUrl, "Cannot open database"<BR><BR> fp_rs.Open "longservice_reg", fp_conn, 1, 3, 2 &#039; adOpenKeySet, adLockOptimistic, adCmdTable<BR> FP_DumpError strErrorUrl, "Cannot open record set"<BR><BR> fp_rs.AddNew<BR> FP_DumpError strErrorUrl, "Cannot add new record set to the database"<BR> Dim arFormFields0(6)<BR> Dim arFormDBFields0(6)<BR> Dim arFormValues0(6)<BR><BR> arFormFields0(0) = "lname"<BR> arFormDBFields0(0) = "Lname"<BR> arFormValues0(0) = Request("lname")<BR> arFormFields0(1) = "address"<BR> arFormDBFields0(1) = "Address"<BR> arFormValues0(1) = Request("address")<BR> arFormFields0(2) = "email"<BR> arFormDBFields0(2) = "Email"<BR> arFormValues0(2) = Request("email")<BR> arFormFields0(3) = "prov"<BR> arFormDBFields0(3) = "prov"<BR> arFormValues0(3) = Request("prov")<BR> arFormFields0(4) = "city"<BR> arFormDBFields0(4) = "city"<BR> arFormValues0(4) = Request("city")<BR> arFormFields0(5) = "fname"<BR> arFormDBFields0(5) = "Fname"<BR> arFormValues0(5) = Request("fname")<BR><BR> FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0<BR><BR><BR> fp_rs.Update<BR> FP_DumpError strErrorUrl, "Cannot update the database"<BR><BR> fp_rs.Close<BR> fp_conn.Close<BR><BR> Session("FP_SavedFields")=arFormFields0<BR> Session("FP_SavedValues")=arFormValues0<BR> Response.Redirect ""<BR><BR>End If<BR>End If<BR><BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default Can't do it in this page...

    ...because this page ends with that<BR> Response.Redirect<BR>line. And you can&#039;t *both* write stuff to browser *and* Response.Redirect.<BR><BR>You&#039;d need to do it in the page that redirects to. But that page is an HTML page ("confirm.htm")!! So I don&#039;t understand how it can do ANYTHING useful, at all, with the saved values.<BR><BR>Maybe that&#039;s the problem??? You confirm page *MUST* be an ASP page in order to do anything useful, so far as I can see.<BR><BR>But it&#039;s kind of badly organized: The data is saved to the DB *BEFORE* the confirm takes place. Yuck. [Because the call to FP_SaveFormFields happens before the redirect to confirm.]<BR><BR>If this is an example of a typical FrontPage app, no wonder people don&#039;t use FP for serious stuff.<BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts