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

 

passing a field name to a confirmation page

 
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 >> passing a field name to a confirmation page
Page: [1] 2   next >   >>
 
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
passing a field name to a confirmation page - 8/1/2006 18:53:00   
i have a 2 page form, the first page submits info to one table in my database, goes to a custom confirmation page which has another form on it that submits to another table in my db. On the second form page, I want it to pass a field name to the confirmation page without using Insert>Component>Confirmation Field because I want to be able to use this field parameter to go to an edit page off of the confimation page. It's been a long week already and I'm brain dead so this is probably an easy fix I'm just overlooking... I'm using FP2000 with the DRW for the forms... Thanks for the help.
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: passing a field name to a confirmation page - 8/1/2006 19:34:24   
Can you post the code for the second form and specify which field's value you want to pass?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/1/2006 19:39:01   
I want to pass the ServName field to options.asp. Here's the code:

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

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

arFormFields0(0) = "Model"
arFormDBFields0(0) = "Model"
arFormValues0(0) = Request("Model")
arFormFields0(1) = "ServName"
arFormDBFields0(1) = "ServName"
arFormValues0(1) = Request("ServName")
arFormFields0(2) = "Gen"
arFormDBFields0(2) = "Gen"
arFormValues0(2) = Request("Gen")
arFormFields0(3) = "PrjID"
arFormDBFields0(3) = "PrjID"
arFormValues0(3) = Request("PrjID")

FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0


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

fp_rs.Close
fp_conn.Close

Session("FP_SavedFields")=arFormFields0
Session("FP_SavedValues")=arFormValues0
Response.Redirect "options.asp"

End If
End If

%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" type="text/css" href="../main2.css" />
<title>:: Implementation Support Services :: New Server Info</title>
</head>

<body>

<table width="700" bordercolor="#C0C0C0" border="1" cellspacing="0">
<tr>
<td width="100" bgcolor="#3399FF"><b><font color="#FFFFFF">Project ID</font></b></td>
<td bgcolor="#3399FF"><b><font color="#FFFFFF">Project Name</font></b></td>
</tr>
<tr>
<td width="100">
<%=Request.Querystring("PrjID")%>
</td>
<td>
<!--webbot bot="ConfirmationField" S-Field="PrjName" -->
</td>
</tr>
</table>

<form method="POST" action="--WEBBOT-SELF--">
<input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="../_fpclass/fpdbform.inc"-->
<p> </p>
<p><b><font color="#FF0000">INSTRUCTIONS:</font></b> Use the form below to
enter the server information. Pick a button at the bottom of the form when you
are finished.</p>
<table border="0" cellpadding="0" cellspacing="1" width="700">
<tr>
<td width="300">Model</td>
<td width="400"><select size="1" name="Model">
<option selected>Please Select</option>
<option value="DL360">DL360</option>
<option value="DL380">DL380</option>
</select></td>
</tr>
<tr>
<td width="300">Generation</td>
<td width="400"><select size="1" name="Gen">
<option selected>Please Select</option>
<option value="G1">G1</option>
<option value="G2">G2</option>
<option value="G3">G3</option>
<option value="G4">G4</option>
</select></td>
</tr>
<tr>
<td width="300">Server Name</td>
<td width="400"><input type="text" name="ServName" size="40"></td>
</tr>
</table>
<input type="hidden" name="PrjID" value="<%=Request("PrjID")%>">
<p><input type="submit" value="Submit" name="B1"></p>
</form>
</code>

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: passing a field name to a confirmation page - 8/1/2006 19:41:16   
FP creates an array of all form field values. Try this code somewhere on options.asp:

<%=Session("FP_SavedValues")(1)%>

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/1/2006 19:45:05   
I get:

Microsoft VBScript runtime error '800a000d'

Type mismatch: '[string: ""]'

/serverdb/options.asp, line 36

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: passing a field name to a confirmation page - 8/1/2006 21:43:43   
Hmmm. The above works great for me on a test page. Can you post the code for options.asp so I can see how you have implemented?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/2/2006 13:06:47   
OK, I got that working now... how do I now pass that value to a new page?

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: passing a field name to a confirmation page - 8/2/2006 13:12:56   
Couple of ways. You could put the value in a hidden field. However, the Session value should be available on additional pages so you could use it exactly as I posted above.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/2/2006 18:56:30   
cool... got that to work...
now i want to use that value as the value for my DRW. I made a hidden text field and then tried to use this in my DRW statement:
fp_sQry="SELECT * FROM server WHERE ServName = '::ServName::'"

with my hidden field being:
<input type="hidden" name="ServName" value="<%=Session("FP_SavedValues")(1)%>" size="20">

But it's not working... any ideas?

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: passing a field name to a confirmation page - 8/2/2006 20:03:50   
Try this:

fp_sQry="SELECT * FROM server WHERE ServName = '"& Session("FP_SavedValues")(1)&"'"

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/2/2006 20:32:29   
Thanks Duane! Right as usual!

(in reply to BeTheBall)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/21/2006 14:17:16   
Duane,
After this confirmation page (options.asp), I have a link that copies the data to a new form that pre-populates the fields based on the last entry (addserver.asp). Then it submits it to options2.asp but I can't get it to display the new server info, it is displaying the info from options.asp. I am using:

fp_sQry="SELECT * FROM server WHERE ServName = '"& Session("FP_SavedValues")(28)&"'"

for both the options.asp and options2.asp... what can I use for options2.asp instead to make it work correctly? Thanks...

(in reply to jgeatty)
Spooky

 

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

 
RE: passing a field name to a confirmation page - 8/21/2006 17:34:49   
If you response.write Session("FP_SavedValues")(28), does it give a valid response?

_____________________________

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

§þ:)


(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/21/2006 17:43:13   
yeah it gives me server001 (if that was the first server i entered), instead of server002 on the second confirmation page (options2.asp)

(in reply to Spooky)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: passing a field name to a confirmation page - 8/21/2006 19:06:55   
If there are two forms in the process, the session values will be overwritten with the values of the most recently submitted form given that the session name will be the same for both forms. I take it that options.asp and addserver.asp are each forms that submit to the db? One option may be to alter the name of the session on one of the pages so that they aren't overwritten by the submission of the other form.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/21/2006 19:15:26   
well, because i am using the drw, the first form just submits to the db and is the directed to a custom confirmation page (options.asp). Then when I link to addserver.asp and submit that page, it go to options2.asp which I use fp_sQry="INSERT INTO server... code to add the record to the db. So I can't use Session("FP_SavedValues")(28) to recall the name to display the data... (if any of that made sense)

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: passing a field name to a confirmation page - 8/21/2006 19:22:52   
Not completely sure I follow given the fact it sounds like there are 4-5 pages involved here. So addserver.asp submits to options2.asp, right? Where exactly does the server name you are looking to write come from? Does the user enter it on addserver.asp?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/21/2006 19:36:41   
yes...

1. User goes to project.asp and enters some project info for the servers they want built and submits it to a table in the db
2. The user is then taken to another form, server.asp and they fill out information about a server and submit that to another table in the db referencing a project ID from project.asp.
3. The user is taken to a custom confirmation page, options.asp, where the server info is displayed and the user has a choice to copy this info to a new form and modify it for another server entry or exit to the main menu.
4. If the user chooses to copy the info, they are taken to addsever.asp and fill out the form to add another server to the project.
5. That submits to options2.asp which inserts another record and should display this new server info but it's displaying the old server info instead...

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: passing a field name to a confirmation page - 8/21/2006 20:35:33   
OK, so exactly where does the 2nd server name get entered?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/22/2006 17:13:18   
on addserver.asp... when the get to options.asp or options2.asp the user has the choice of adding more servers or to exit

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: passing a field name to a confirmation page - 8/22/2006 18:33:53   
OK, then on options2.asp, the name of the server should be available via

<%=Request.Form("NameofFormFieldfortheServerFromAddServer.asp")%>

Does that make sense?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/22/2006 18:50:47   
Yes, I got that to work except for the
fp_sQry="SELECT * FROM server WHERE ServName = '"& Request.Form("ServName")&"'"
I know is all screwed up... to recall the last entry on the options2.asp page.

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: passing a field name to a confirmation page - 8/22/2006 19:06:07   
The format looks OK, what is the problem with it? Perhaps seeing the code for options2.asp may help.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/22/2006 19:33:28   
Code for options2.asp:

<body>
<!--#include file="../_fpclass/fpdblib.inc"-->
<%
fp_sQry="INSERT INTO server   (PrjID,Model,Other,Gen,Mem,OSHD,IntDrives,ExtStorage,HBA,TapeBU,ExNIC,DC,DNS,ServName,BuildType,OS,Env,Cluster,ClustAdmin,SQL,SQLform,LoadBalanced,NetDispDNS,Loopback,IIS,FTP,SFTP,Citrix,WebSph,C,E,F,G,Q,Other1,Other1sz,Other2,Other2sz,Waiver,DMZ,SerialNo,AssetTag,Comments) VALUES ('::PrjID::','::Model::','::Other::','::Gen::','::Mem::','::OSHD::','::IntDrives::','::ExtStorage::','::HBA::','::TapeBU::','::ExNIC::','::DC::','::DNS::','  ::ServName::','::BuildType::','::OS::','::Env::','::Cluster::','::ClustAdmin::','::SQL::','::SQLform::','::LoadBalanced::','::NetDispDNS::','::Loopback::','::IIS::','::FTP::','::SFTP::','::Citrix::','::WebSph::','::C::','::E::','::F::','::G::','::Q::','::Other1::','::Other1sz::','::Other2::','::Other2sz::','::W  aiver::','::DMZ::','::SerialNo::','::AssetTag::','::Comments::')"
fp_sDefault="PrjID=&Model=&Other=&Gen=&Mem=&OSHD=&IntDrives=&ExtStorage=&HBA=&TapeBU=&ExNIC=&DC=&DNS=&ServName=&BuildType=&OS=&Env=&Cluster=&ClustAdmin=&SQL=&SQLform=&LoadBalanced=&NetDispDNS=&Loopback=&IIS=&FTP=&SFTP=&Citrix=&WebSph=&C=&E=&F=&G=&Q=&Other1=&Other1sz=&Other2=&Other2sz=&W<br><br>aiver=&DMZ=&SerialNo=&AssetTag=&Comments="
fp_sNoRecords=""
fp_sDataConn="projects"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--#include file="../_fpclass/fpdbrgn2.inc"-->

<input type="hidden" name="ServName" value="<%=Request.Form("ServName")%>" size="20">

<p><b><font color="#3399FF"><%=Request.Form("ServName")%>
</font><font color="#333333"> has been submitted  to the project database.
What would you like to do now?</font></b></p>
<p>    <a href="addserver.asp?ServName=<%=Request.Form("ServName")%>" onclick="return test()">Add
another server to the project >><br>
</a>    (This option copies the data from the server you just entered
so you only have to change a few fields)</p>
<p>    Done entering servers >></p>

<p> </p>
<p>Last Server Entered: <b><%=Request.Form("ServName")%></b></p>
<!--#include file="../_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT * FROM server WHERE ServName = '"& Request.Form("ServName")&"'"
fp_sDefault="ServName="
fp_sNoRecords="No records returned."
fp_sDataConn="projects"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=42
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<table BORDER="1" width="700" cellspacing="0" bordercolor="#C0C0C0" cellpadding="2">
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">Server Model</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"Model")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>Other </b>(if
      applicable)</font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"Other")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">Generation</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"Gen")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">Memory</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"Mem")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>Hard Drive Size for OS</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"OSHD")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>Number of Internal Drives</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"IntDrives")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>External Storage</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"ExtStorage")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>   Fiber HBA cards purchased</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"HBA")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>Tape backup needed</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"TapeBU")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">   </font></b><font color="#FFFFFF"><b>Extra NIC purchased for backup</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"ExNIC")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>Data Center</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"DC")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>DNS Suffix</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"DNS")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>Server Name</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"ServName")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>Build Type</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"BuildType")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">OS</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"OS")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">Environment</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"Env")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">Cluster</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"Cluster")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>   Name of Cluster Admin Account</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"ClustAdmin")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">SQL</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"SQL")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>   Approved SQL Form Attached to SR</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"SQLform")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>Network Dispatcher Load Balanced</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"LoadBalanced")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>Network Dispatcher DNS Name
      </b> (if known)</font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"NetDispDNS")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>Loopback Adapter IP
      </b> (if known)</font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"Loopback")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">IIS</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"IIS")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">FTP</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"FTP")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">Secure FTP</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"SFTP")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">Citrix</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"Citrix")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">Web Sphere</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"WebSph")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">Drive Sizes (GB)</font></b></td>
    <td width="400">C: <%=FP_FieldVal(fp_rs,"C")%>, E: <%=FP_FieldVal(fp_rs,"E")%>, F: <%=FP_FieldVal(fp_rs,"F")%>, G: <%=FP_FieldVal(fp_rs,"G")%>, Q: <%=FP_FieldVal(fp_rs,"Q")%> 
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF">   <b><font color="#FFFFFF">Other
      Drives</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"Other1")%>: <%=FP_FieldVal(fp_rs,"Other1sz")%>, <%=FP_FieldVal(fp_rs,"Other2")%>: <%=FP_FieldVal(fp_rs,"Other2sz")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>Approved Waiver Attached to SR</b> (if needed)</font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"Waiver")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><font color="#FFFFFF"><b>Server in DMZ</b></font></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"DMZ")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">Serial Number</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"SerialNo")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">Asset Tag</font></b></td>
    <td width="400"><%=FP_FieldVal(fp_rs,"AssetTag")%>
    </td>
  </tr>
  <tr>
    <td width="300" bgcolor="#3399FF"><b><font color="#FFFFFF">Comments</font></b></td>
    <td width="400"><%=replace(FP_FieldVal(fp_rs,"Comments"),chr(10)," <br>")%>
    </td>
  </tr>
</table>
<!--#include file="../_fpclass/fpdbrgn2.inc"-->
<p> </p>

</body>



I get this with that code:

Database Results Error
Description: [Microsoft][ODBC Microsoft Access Driver] The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

One or more form fields were empty. You should provide default values for all form fields that are used in the query.

testing013 has been submitted to the project database. What would you like to do now?

Add another server to the project >>
(This option copies the data from the server you just entered so you only have to change a few fields)

Done entering servers >>



Last Server Entered: testing013
No records returned.


< Message edited by BeTheBall -- 8/22/2006 20:28:46 >

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: passing a field name to a confirmation page - 8/22/2006 20:05:11   
OK. Something in your INSERT statement has a value that already exists in the database table in a field that must be unique.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/22/2006 20:22:33   
The wierd thing is if I don't change the last DRW to display the last server it works fine. If I change fp_sQry="SELECT * FROM server WHERE ServName = '"& Request.Form("ServName")&"'" to ....WHERE ServName = ServName, it just displays the frist record in the db, so I don't think it's the INSERT statement... then again, I'm obviously not the expert. ;)

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: passing a field name to a confirmation page - 8/22/2006 20:27:58   
Have you verified that the records are indeed being inserted?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/22/2006 20:39:57   
yep, they're there....

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: passing a field name to a confirmation page - 8/22/2006 20:54:30   
Hmmm. Running out of ideas. I am stumped as to why the presence of a SELECT query would cause the error above. What happens if you add the bold below:

<%
fp_sQry="SELECT * FROM server WHERE ServName = '"& Request.Form("ServName")&"'"
fp_sDefault="ServName="
fp_sNoRecords="No records returned."
fp_sDataConn="projects"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=42
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<%
Response.write (fp_sQry)
Response.end
%>


< Message edited by BeTheBall -- 8/22/2006 21:17:42 >


_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to jgeatty)
jgeatty

 

Posts: 199
Joined: 10/14/2004
Status: offline

 
RE: passing a field name to a confirmation page - 8/25/2006 14:13:46   
sorry for the slow response, i've been stuck on other projects... when i use the above code, i don't get the error anymore, but i do get "no records returned" where the drw should be displaying the last record...

(in reply to BeTheBall)
Page:   [1] 2   next >   >>

All Forums >> Web Development >> ASP and Database >> passing a field name to a confirmation page
Page: [1] 2   next >   >>
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