navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
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

Search Forums
 

Advanced search
Recent Posts

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

Microsoft MVP

 

Criteria Restricted Subwindow Form

 
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 >> Criteria Restricted Subwindow Form
Page: [1]
 
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
Criteria Restricted Subwindow Form - 6/15/2004 8:30:33   
I am sure this has been addressed somewhere on the forum but I cannot locate anything. I have a main web page that retrieves records with specific criteria. I need for users to click on those records and only that specific record is opened in a seperate window that can then post its updates back to the database. How is this done?
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/15/2004 12:19:30   
Begin by creating a new page and on that page insert a database results region that will pull up a single record based on the criteria you will send from the first page. Ideally, this will be the unique ID of the record. When you get to step 5 of the wizard, uncheck the "Add Search Form" checkbox as you will get the criteria from a hyperlink, not a search form.

Then go back to the results page and hyperlink one of the fields to the new page. You will want to include the ID of the record as a hyperlink parameter. For more info on how to do that, see this Spooky tutorial (meaning Spooky wrote it, not that the tutorial is frightful :))

That should give you a good start.

_____________________________

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 styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 8:35:40   
Is there a workaround for the criteria when builing the Query page for this task? When I follow the steps on the Query page and get to criteria and just enter PurchaseOrder in the first box, equals and then PurchaseOrder I get a type mismatch error saying but fields must be integre. Or maybe I am doing something wrong with the results page.

(in reply to BeTheBall)
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 8:48:13   
What is the exact error? One work around would be to simply choose another field, finish the page, use the Spooky Diet and then change the SQL so that the criteria is the field you wanted. By the way, there is a macro that will perform the Spooky Diet for you. It's at:

http://www.frontpagewebmaster.com/m-54911/mpage-1/key-diet%252Cmacro//tm.htm#54923

_____________________________

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 styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 8:49:36   
I think I have completed this task incorrectly. Can someone advise me on why this isn't working? PurchaseOrder is the key field.

This is the hyperlink I have on the originating page--

<a target="_blank" href="manman_minton.asp<%=FP_FieldLink(fp_rs,"PurchaseOrder")%>">

Here is the code of the results page--

<%
'If the session variable is False or does not exsist then redirect the user to the unauthorized user page
If Session("blnIsUserGood") = False or IsNull(Session("blnIsUserGood")) = True then
	
	'Redirect to unathorized user page
	Response.Redirect"..\..\..\protected\unauthorized_user_page.htm"
End If
%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Minton Purchase Order Center</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body bgcolor="#FFFFFF">
<!--webbot bot="PurpleText" PREVIEW="-Important-  If you modify this Database Results region using the Database Results Wizard, then your Database Editor will no longer work.  If you accidentally open the Database Results Wizard, simply click Cancel to exit without regenerating the Database Results region." -->

<!--webbot bot="DatabaseRegionStart" s-columnnames="PurchaseOrder,ClassificationType,Requestor,Vendor,Created,NotToExceed,EnteredBy,EnteredIntoManMan,POStatus" s-columntypes="3,202,202,202,202,202,202,202,202" s-dataconnection="Purchase_Orders" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="FALSE" i-ListFormat="5" b-makeform="FALSE" s-RecordSource="tblPurchaseOrders_Minton_PO" s-displaycolumns="PurchaseOrder,ClassificationType,Requestor,Vendor,Created,NotToExceed,EnteredBy,EnteredIntoManMan,POStatus" s-criteria="{PurchaseOrder} EQ {PurchaseOrder} +" s-order s-sql="SELECT * FROM tblPurchaseOrders_Minton_PO WHERE PurchaseOrder = ::PurchaseOrder::" b-procedure="FALSE" clientside SuggestedExt="asp" s-DefaultFields="PurchaseOrder=0" s-NoRecordsFound="No records returned." i-MaxRecords="1" i-GroupSize="0" u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" Tag="BODY" startspan BOTID="0" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr></table>" --><!--#include file="../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM tblPurchaseOrders_Minton_PO WHERE PurchaseOrder = ::PurchaseOrder::"
fp_sDefault="PurchaseOrder=0"
fp_sNoRecords="No records returned."
fp_sDataConn="Purchase_Orders"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&PurchaseOrder=3&ClassificationType=202&Requestor=202&Vendor=202&Created=202&NotToExceed=202&EnteredBy=202&EnteredIntoManMan=202&POStatus=202&"
fp_iDisplayCols=9
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="25786" --> <form METHOD="POST" action="editor/update.asp" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
	<table BORDER=0>

<tr>
<td><b><font size="2">ClassificationType:</font></b></td>
<td> <!--webbot bot="Validation" s-display-name="ClassificationType" s-data-type="String" b-value-required="False" i-maximum-length="50" --><input type="TEXT" name="ClassificationType" size="50" value="<%=FP_FieldHTML(fp_rs,"ClassificationType")%>" maxlength="50"></td>
</tr>
<tr>
<td><b><font size="2">Requestor:</font></b></td>
<td> <!--webbot bot="Validation" s-display-name="Requestor" s-data-type="String" b-value-required="False" i-maximum-length="50" --><input type="TEXT" name="Requestor" size="50" value="<%=FP_FieldHTML(fp_rs,"Requestor")%>" maxlength="50"></td>
</tr>
<tr>
<td><b><font size="2">Vendor:</font></b></td>
<td> <!--webbot bot="Validation" s-display-name="Vendor" s-data-type="String" b-value-required="False" i-maximum-length="50" --><input type="TEXT" name="Vendor" size="50" value="<%=FP_FieldHTML(fp_rs,"Vendor")%>" maxlength="50"></td>
</tr>
<tr>
<td><b><font size="2">Created:</font></b></td>
<td> <!--webbot bot="Validation" s-display-name="Created" s-data-type="String" b-value-required="False" i-maximum-length="50" --><input type="TEXT" name="Created" size="50" value="<%=FP_FieldHTML(fp_rs,"Created")%>" maxlength="50"></td>
</tr>
<tr>
<td><b><font size="2">NotToExceed:</font></b></td>
<td> <!--webbot bot="Validation" s-display-name="NotToExceed" s-data-type="String" b-value-required="False" i-maximum-length="50" --><input type="TEXT" name="NotToExceed" size="50" value="<%=FP_FieldHTML(fp_rs,"NotToExceed")%>" maxlength="50"></td>
</tr>
<tr>
<td><b><font size="2">EnteredBy:</font></b></td>
<td> <!--webbot bot="Validation" s-display-name="EnteredBy" s-data-type="String" b-value-required="False" i-maximum-length="50" --><input type="TEXT" name="EnteredBy" size="50" value="<%=FP_FieldHTML(fp_rs,"EnteredBy")%>" maxlength="50"></td>
</tr>
<tr>
<td><b><font size="2">EnteredIntoManMan:</font></b></td> 
<td> Yes <input type="radio" name="EnteredIntoManMan" value="Yes" <%If FP_FieldHTML(fp_rs,"EnteredIntoManMan")="Yes" Then Response.write(" checked") End IF%>>No 
<input type="radio" name="EnteredIntoManMan" value="No" <%If FP_FieldHTML(fp_rs,"EnteredIntoManMan")="No" Then Response.write(" checked") End IF%>></td> 
</td>
</tr>
<tr>
<td><b><font size="2">POStatus:</font></b></td> 
<td> Open <input type="radio" name="POStatus" value="Open" <%If FP_FieldHTML(fp_rs,"POStatus")="Open" Then Response.write(" checked") End IF%>>Closed 
<input type="radio" name="POStatus" value="Closed" <%If FP_FieldHTML(fp_rs,"POStatus")="Closed" Then Response.write(" checked") End IF%>></td> 

	
	<tr>
	<td colspan="2"><input type="submit" value="    OK    "><input type="reset" value=" Reset "></td>
	</tr>

	</table>

	<input type="hidden" name="PurchaseOrder" value="<%=FP_FieldHTML(fp_rs,"PurchaseOrder")%>">
</form>

<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside Tag="BODY" startspan preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" -->

</body>

</html>


< Message edited by Spooky -- 6/16/2004 15:56:45 >

(in reply to styrochem)
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 8:52:21   
The hyperlink should be:

<a target="_blank" href="manman_minton.asp?PurchaseOrder=<%=FP_FieldLink(fp_rs,"PurchaseOrder")%>">

_____________________________

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 styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 8:59:16   
Now I receive a page cannot be displayed error instead of the results page.

Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
C:\INETPUB\WWWROOT\PURCHASE_ORDERS_INTERFACE\TRIALS\../../_fpclass/fpdblib.inc, line 48


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Page:
GET /Purchase_Orders_interface/TRIALS/manman_minton.asp

(in reply to BeTheBall)
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 9:20:04   
Hmmm. That's a little unusual for the DRW. That error usually means that you are trying to display some value that doesn't exist in the recordset. For example, you have:

<%=FP_FieldHTML(fp_rs,"Created")%>

Supposing the field in the db were really X_Created, then the above error would be thrown. Since the DRW chooses the fields by itself, it is unusual to get that error. Is the error occurring before or after you click the link? If before, you'll need to post the code for the page the link is on. Otherwise, check the red code carefully to make sure the values names match your db fields.

_____________________________

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 styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 11:19:59   
The code is the page above. The results page.

(in reply to BeTheBall)
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 11:47:44   
So is the error occuring before or after you click the link? In other words, does the page with the link load fine and then when you click the link you get the above error?

_____________________________

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 styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 11:49:34   
When you click the link...it opens the results page and that error is what comes up.

(in reply to BeTheBall)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 12:08:53   
Here is the new problem and maybe I can shortcut it. I ran the database editor on the page and now it works but the data can no longer be edited. So how could I just implement text boxes and avoid this complication?

(in reply to styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 12:10:24   
Here is how the code now looks on the results page---- I just now need to make an a form where they can update the information and submit it to the database.

<%
'If the session variable is False or does not exsist then redirect the user to the unauthorized user page
If Session("blnIsUserGood") = False or IsNull(Session("blnIsUserGood")) = True then
	
	'Redirect to unathorized user page
	Response.Redirect"..\..\..\protected\unauthorized_user_page.htm"
End If
%>

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Minton Purchase Order Center</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body bgcolor="#FFFFFF">
<!--webbot bot="PurpleText" PREVIEW="-Important-  If you modify this Database Results region using the Database Results Wizard, then your Database Editor will no longer work.  If you accidentally open the Database Results Wizard, simply click Cancel to exit without regenerating the Database Results region." -->

<!--webbot bot="DatabaseRegionStart" s-columnnames="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,ConfirmedSignedPurchaseReq,EnteredBy,EnteredIntoManMan,POStatus,Comments,DateofManManEntry,DatePOClosed" s-columntypes="3,202,202,202,202,202,202,202,202,203,202,202" s-dataconnection="Purchase_Orders" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="FALSE" i-listformat="5" b-makeform="FALSE" s-recordsource="tblPurchaseOrders_Minton_PO" s-displaycolumns="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,EnteredBy,EnteredIntoManMan,POStatus" s-criteria="{PurchaseOrder} EQ {PurchaseOrder} +" s-order s-sql="SELECT * FROM tblPurchaseOrders_Minton_PO WHERE (PurchaseOrder =  ::PurchaseOrder::)" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="PurchaseOrder=0" s-norecordsfound="No records returned." i-maxrecords="1" i-groupsize="0" botid="0" u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr></table>" startspan --><!--#include file="../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM tblPurchaseOrders_Minton_PO WHERE (PurchaseOrder =  ::PurchaseOrder::)"
fp_sDefault="PurchaseOrder=0"
fp_sNoRecords="No records returned."
fp_sDataConn="Purchase_Orders"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&PurchaseOrder=3&Requestor=202&Vendor=202&Created=202&NotToExceed=202&ConfirmedSignedPurchaseReq=202&EnteredBy=202&EnteredIntoManMan=202&POStatus=202&Comments=203&DateofManManEntry=202&DatePOClosed=202&"
fp_iDisplayCols=8
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan --><table BORDER="1">
  <tr>
    <td><b>PurchaseOrder:</b></td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,ConfirmedSignedPurchaseReq,EnteredBy,EnteredIntoManMan,POStatus,Comments,DateofManManEntry,DatePOClosed" s-column="PurchaseOrder" b-tableformat="FALSE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>PurchaseOrder<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"PurchaseOrder")%><!--webbot bot="DatabaseResultColumn" endspan --></td>
  </tr>
  <tr>
    <td><b>Requestor:</b></td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,ConfirmedSignedPurchaseReq,EnteredBy,EnteredIntoManMan,POStatus,Comments,DateofManManEntry,DatePOClosed" s-column="Requestor" b-tableformat="FALSE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>Requestor<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"Requestor")%><!--webbot bot="DatabaseResultColumn" endspan --></td>
  </tr>
  <tr>
    <td><b>Vendor:</b></td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,ConfirmedSignedPurchaseReq,EnteredBy,EnteredIntoManMan,POStatus,Comments,DateofManManEntry,DatePOClosed" s-column="Vendor" b-tableformat="FALSE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>Vendor<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"Vendor")%><!--webbot bot="DatabaseResultColumn" endspan --></td>
  </tr>
  <tr>
    <td><b>Created:</b></td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,ConfirmedSignedPurchaseReq,EnteredBy,EnteredIntoManMan,POStatus,Comments,DateofManManEntry,DatePOClosed" s-column="Created" b-tableformat="FALSE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>Created<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"Created")%><!--webbot bot="DatabaseResultColumn" endspan --></td>
  </tr>
  <tr>
    <td><b>NotToExceed:</b></td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,ConfirmedSignedPurchaseReq,EnteredBy,EnteredIntoManMan,POStatus,Comments,DateofManManEntry,DatePOClosed" s-column="NotToExceed" b-tableformat="FALSE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>NotToExceed<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"NotToExceed")%><!--webbot bot="DatabaseResultColumn" endspan --></td>
  </tr>
  <tr>
    <td><b>EnteredBy:</b></td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,ConfirmedSignedPurchaseReq,EnteredBy,EnteredIntoManMan,POStatus,Comments,DateofManManEntry,DatePOClosed" s-column="EnteredBy" b-tableformat="FALSE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>EnteredBy<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"EnteredBy")%><!--webbot bot="DatabaseResultColumn" endspan --></td>
  </tr>
  <tr>
    <td><b>EnteredIntoManMan:</b></td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,ConfirmedSignedPurchaseReq,EnteredBy,EnteredIntoManMan,POStatus,Comments,DateofManManEntry,DatePOClosed" s-column="EnteredIntoManMan" b-tableformat="FALSE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>EnteredIntoManMan<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"EnteredIntoManMan")%><!--webbot bot="DatabaseResultColumn" endspan --></td>
  </tr>
  <tr>
    <td><b>POStatus:</b></td>
    <td>
    <!--webbot bot="DatabaseResultColumn" s-columnnames="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,ConfirmedSignedPurchaseReq,EnteredBy,EnteredIntoManMan,POStatus,Comments,DateofManManEntry,DatePOClosed" s-column="POStatus" b-tableformat="FALSE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>POStatus<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"POStatus")%><!--webbot bot="DatabaseResultColumn" endspan --></td>
  </tr>
</table>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" startspan --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan -->

</body>

</html>


< Message edited by Spooky -- 6/16/2004 15:57:12 >

(in reply to styrochem)
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 12:13:17   
Your code from above should provide you a pretty good idea. For example, where your page shows:

<%=FP_FieldHTML(fp_rs,"EnteredBy")%>

Put something like:

<input type="TEXT" name="EnteredBy" size="50" value="<%=FP_FieldHTML(fp_rs,"EnteredBy")%>

Of course, you first need to insert a form on your page, then cut the db results region and paste it inside the form.

Does that help?

< Message edited by betheball -- 6/16/2004 12:24:18 >


_____________________________

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 styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 14:15:40   
New Complication -- It opens the form and responds with no error messages but is not updating the records in the database.

Page Code---

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>PurchaseOrder</title>
</head>

<body>

<form method="POST" action="manman_minton2.asp" webbot-action="--WEBBOT-SELF--">
  <!--webbot bot="SaveResults" u-file="../../_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" startspan --><strong>[FrontPage Save Results Component]</strong><!--webbot bot="SaveResults" endspan i-checksum="6561" --><!--webbot bot="DatabaseRegionStart" s-columnnames="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,ConfirmedSignedPurchaseReq,EnteredBy,EnteredIntoManMan,POStatus,Comments,DateofManManEntry,DatePOClosed" s-columntypes="3,202,202,202,202,202,202,202,202,203,202,202" s-dataconnection="Purchase_Orders" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="FALSE" i-listformat="5" b-makeform="FALSE" s-recordsource="tblPurchaseOrders_Minton_PO" s-displaycolumns="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,EnteredBy,EnteredIntoManMan,POStatus" s-criteria="{PurchaseOrder} EQ {PurchaseOrder} +" s-order s-sql="SELECT * FROM tblPurchaseOrders_Minton_PO WHERE (PurchaseOrder =  ::PurchaseOrder::)" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="PurchaseOrder=0" s-norecordsfound="No records returned." i-maxrecords="1" i-groupsize="0" botid="0" u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr></table>" startspan --><!--#include file="../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM tblPurchaseOrders_Minton_PO WHERE (PurchaseOrder =  ::PurchaseOrder::)"
fp_sDefault="PurchaseOrder=0"
fp_sNoRecords="No records returned."
fp_sDataConn="Purchase_Orders"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&PurchaseOrder=3&Requestor=202&Vendor=202&Created=202&NotToExceed=202&ConfirmedSignedPurchaseReq=202&EnteredBy=202&EnteredIntoManMan=202&POStatus=202&Comments=203&DateofManManEntry=202&DatePOClosed=202&"
fp_iDisplayCols=8
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan --><table BORDER="1">
  <tr>
    <td><b>PurchaseOrder:</b></td>
    <td>
    <input type="text" name="PurchaseOrder" size="20" value="<%=FP_FieldHTML(fp_rs,"PurchaseOrder")%>"></td>
  </tr>
  <tr>
    <td><b>Requestor:</b></td>
    <td>
    <input type="text" name="Requestor" size="20" value="<%=FP_FieldHTML(fp_rs,"Requestor")%>"></td>
  </tr>
  <tr>
    <td><b>Vendor:</b></td>
    <td>
    <input type="text" name="Vendor" size="20" value="<%=FP_FieldHTML(fp_rs,"Vendor")%>"></td>
  </tr>
  <tr>
    <td><b>Created:</b></td>
    <td>
    <input type="text" name="Created" size="20" value="<%=FP_FieldHTML(fp_rs,"Created")%>"></td>
  </tr>
  <tr>
    <td><b>NotToExceed:</b></td>
    <td>
    <input type="text" name="NotToExceed" size="20" value="<%=FP_FieldHTML(fp_rs,"NotToExceed")%>"></td>
  </tr>
  <tr>
    <td><b>EnteredBy:</b></td>
    <td>
    <input type="text" name="EnteredBy" size="20" value="<%=FP_FieldHTML(fp_rs,"EnteredBy")%>"></td>
  </tr>
  <tr>
    <td><b>EnteredIntoManMan:</b></td>
    <td>
    <input type="text" name="EnteredIntoManMan" size="20" value="<%=FP_FieldHTML(fp_rs,"EnteredIntoManMan")%>"></td>
  </tr>
  <tr>
    <td><b>POStatus:</b></td>
    <td>
    <input type="text" name="POStatus" size="20" value="<%=FP_FieldHTML(fp_rs,"POStatus")%>"></td>
  </tr>
</table>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" startspan --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan --><p>
  <input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

</body>

</html>


< Message edited by Spooky -- 6/16/2004 15:57:38 >

(in reply to BeTheBall)
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/16/2004 15:26:53   
What is the code that performs the update?

_____________________________

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 styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/18/2004 7:45:26   
This is where I am being limited on knowledge regarding web programming. I am not sure which script is running that command other than the submit button at the bottom. Basically I utilized an existing edit page in the database and the only submission code it displays is Submit with value OK. Does that help?

quote:

<input type="text" name="POStatus" size="20" value="<%=FP_FieldHTML(fp_rs,"POStatus")%>"></td>

(in reply to BeTheBall)
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/18/2004 8:21:42   
What is the code for manman_minton2.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 styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/18/2004 8:26:29   
Here is the code for the submission form that is suppose to post the updates to the database--

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>PurchaseOrder</title>
</head>

<body>

<form method="POST" action="--WEBBOT-SELF--">
  <!--webbot bot="SaveResults" u-file="../../_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" startspan --><strong>[FrontPage Save Results Component]</strong><!--webbot bot="SaveResults" endspan i-checksum="6561" --><!--webbot bot="DatabaseRegionStart" s-columnnames="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,ConfirmedSignedPurchaseReq,EnteredBy,EnteredIntoManMan,POStatus,Comments,DateofManManEntry,DatePOClosed" s-columntypes="3,202,202,202,202,202,202,202,202,203,202,202" s-dataconnection="Purchase_Orders" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="FALSE" i-listformat="5" b-makeform="FALSE" s-recordsource="tblPurchaseOrders_Minton_PO" s-displaycolumns="PurchaseOrder,Requestor,Vendor,Created,NotToExceed,EnteredBy,EnteredIntoManMan,POStatus" s-criteria="{PurchaseOrder} EQ {PurchaseOrder} +" s-order s-sql="SELECT * FROM tblPurchaseOrders_Minton_PO WHERE (PurchaseOrder =  ::PurchaseOrder::)" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="PurchaseOrder=0" s-norecordsfound="No records returned." i-maxrecords="1" i-groupsize="0" botid="0" u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr></table>" startspan --><!--#include file="../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM tblPurchaseOrders_Minton_PO WHERE (PurchaseOrder =  ::PurchaseOrder::)"
fp_sDefault="PurchaseOrder=0"
fp_sNoRecords="No records returned."
fp_sDataConn="Purchase_Orders"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&PurchaseOrder=3&Requestor=202&Vendor=202&Created=202&NotToExceed=202&ConfirmedSignedPurchaseReq=202&EnteredBy=202&EnteredIntoManMan=202&POStatus=202&Comments=203&DateofManManEntry=202&DatePOClosed=202&"
fp_iDisplayCols=8
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="49390" --><table BORDER="1" width="332">
  <tr>
    <td width="149"><b>PurchaseOrder:</b></td>
    <td width="167">
    <input type="text" name="PurchaseOrder" size="23" value="<%=FP_FieldHTML(fp_rs,"PurchaseOrder")%>"></td>
  </tr>
  <tr>
    <td width="149"><b>Requestor:</b></td>
    <td width="167">
    <input type="text" name="Requestor" size="23" value="<%=FP_FieldHTML(fp_rs,"Requestor")%>"></td>
  </tr>
  <tr>
    <td width="149"><b>Vendor:</b></td>
    <td width="167">
    <input type="text" name="Vendor" size="23" value="<%=FP_FieldHTML(fp_rs,"Vendor")%>"></td>
  </tr>
  <tr>
    <td width="149"><b>Created:</b></td>
    <td width="167">
    <input type="text" name="Created" size="23" value="<%=FP_FieldHTML(fp_rs,"Created")%>"></td>
  </tr>
  <tr>
    <td width="149"><b>NotToExceed:</b></td>
    <td width="167">
    <input type="text" name="NotToExceed" size="23" value="<%=FP_FieldHTML(fp_rs,"NotToExceed")%>"></td>
  </tr>
  <tr>
    <td width="149"><b>EnteredBy:</b></td>
    <td width="167">
    <input type="text" name="EnteredBy" size="23" value="<%=FP_FieldHTML(fp_rs,"EnteredBy")%>"></td>
  </tr>
  <tr>
    <td width="149"><b>EnteredIntoManMan:</b></td>
    <td width="167">
    <input type="text" name="EnteredIntoManMan" size="23" value="<%=FP_FieldHTML(fp_rs,"EnteredIntoManMan")%>"></td>
  </tr>
  <tr>
    <td width="149"><b>POStatus:</b></td>
    <td width="167">
    <input type="text" name="POStatus" size="23" value="<%=FP_FieldHTML(fp_rs,"POStatus")%>"></td>
  </tr>
</table>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" startspan --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" --><p>
  <input type="submit" value="Submit" name="    OK    "><input type="reset" value="Reset" name="B2"></p>
</form>

</body>

</html>

Now I did discover the Frontpage wizard created an update query page so do I need to make something like this in order for the other page to post updates to the database?

<% 
'If the session variable is False or does not exsist then redirect the user to the unauthorized user page
If Session("blnIsUserGood") = False or IsNull(Session("blnIsUserGood")) = True then

'Redirect to unathorized user page
Response.Redirect"..\..\..\protected\unauthorized_user_page.htm"
End If
%>

<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Minton Purchase Order Center -- Updated Record</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body bgcolor="#FFFFFF">
<!--webbot bot="PurpleText" PREVIEW="-Important- If you modify this Database Results region using the Database Results Wizard, then your Database Editor will no longer work. If you accidentally open the Database Results Wizard, simply click Cancel to exit without regenerating the Database Results region." -->

<script Language="JavaScript">
<!--
top.list.location.href = top.list.location.href;
// -->
</script>

<!--webbot bot="DatabaseRegionStart" s-columnnames="PurchaseOrder,ClassificationType,Requestor,Vendor,Created,NotToExceed,EnteredBy,EnteredIntoManMan,POStatus" s-columntypes="3,202,202,202,202,202,202,202,202" s-dataconnection="Purchase_Orders" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="FALSE" b-listseparator="FALSE" i-ListFormat="0" b-makeform="FALSE" s-RecordSource s-displaycolumns s-criteria s-order s-sql="UPDATE tblPurchaseOrders_Minton_PO SET ClassificationType = '::ClassificationType::' , Requestor = '::Requestor::' , Vendor = '::Vendor::' , Created = '::Created::' , NotToExceed = '::NotToExceed::' , EnteredBy = '::EnteredBy::' , EnteredIntoManMan = '::EnteredIntoManMan::' , POStatus = '::POStatus::' WHERE (PurchaseOrder = ::PurchaseOrder::)" b-procedure="FALSE" clientside SuggestedExt="asp" s-DefaultFields="ClassificationType=&Requestor=&Vendor=&Created=&NotToExceed=&EnteredBy=&EnteredIntoManMan=&POStatus=&PurchaseOrder=0" s-NoRecordsFound="Record updated in table." i-MaxRecords="1" i-GroupSize="0" u-dblib="../../../_fpclass/fpdblib.inc" u-dbrgn1="../../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../../_fpclass/fpdbrgn2.inc" Tag="BODY" startspan BOTID="0" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr></table>" --><!--#include file="../../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="UPDATE tblPurchaseOrders_Minton_PO SET ClassificationType = '::ClassificationType::' , Requestor = '::Requestor::' , Vendor = '::Vendor::' , Created = '::Created::' , NotToExceed = '::NotToExceed::' , EnteredBy = '::EnteredBy::' , EnteredIntoManMan = '::EnteredIntoManMan::' , POStatus = '::POStatus::' WHERE (PurchaseOrder = ::PurchaseOrder::)"
fp_sDefault="ClassificationType=&Requestor=&Vendor=&Created=&NotToExceed=&EnteredBy=&EnteredIntoManMan=&POStatus=&PurchaseOrder=0"
fp_sNoRecords="Record updated in table."
fp_sDataConn="Purchase_Orders"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&PurchaseOrder=3&ClassificationType=202&Requestor=202&Vendor=202&Created=202&NotToExceed=202&EnteredBy=202&EnteredIntoManMan=202&POStatus=202&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="24373" -->

<p><!--webbot bot="PurpleText" PREVIEW="This is the UPDATE query." --></p>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside Tag="BODY" startspan preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" --><!--#include file="../../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="9297" -->

</body>

</html>

(in reply to BeTheBall)
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/18/2004 9:20:56   
Just to be sure that I understand the process. The update form is loading and is correctly prepopulated with the record you want to update. You then make changes and click submit. The form submits to manman_minton2.asp with no error message, but you then open the db and the record has not updated. Is that correct? I have seen cases where a form that enters a new record fails with no error message. This would be the first time I have seen an UPDATE fail without an error message.

_____________________________

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 styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/18/2004 10:02:27   
That is correct....it pulls the correct record from the database but will just refresh the form and make no changes to the record in the database. No error messages either.

(in reply to BeTheBall)
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/18/2004 11:05:57   
See if this helps. Right click the form and choose "Form Properties". Make sure the "Send to Other" radio button is marked and click options. In the Action, enter: manman_minton2.asp

I think your form is trying to submit directly to the db instead of to the page that performs the update.

_____________________________

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 styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/21/2004 8:05:19   
How would this change resolve the issue? Its having trouble posting the information from the results page. It is able to retrieve the information with no problems. Did I miss something?

(in reply to BeTheBall)
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/21/2004 9:17:52   
quote:

it pulls the correct record from the database but will just refresh the form and make no changes to the record in the database. No error messages either.


That tells me that the form is not submitting to manman_minton2.asp. As a result, the update is not executing. The code for your form gives me the impression that it originated as a form that submitted directly to the db, which only works for inserting new records, not updating existing ones. Try opening the page with your form. Then, switch to HTML view and click refresh. Then paste the full code here.

_____________________________

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 styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/21/2004 9:34:41   
I am starting to think I missed a step in designing this form. The only page that has any information including a submit button is the manman_minton2.asp page. Is there an additional form I am suppose to have to process this information? Here is the page as of now.

manman_minton2.asp 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
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("_ConnectionString")
	FP_DumpError strErrorUrl, "Cannot open database"

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


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

End If
End If

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

%>
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>PurchaseOrder</title>
</head>

<body>

<form method="POST" action="update.asp">
  <!--#include file="../../_fpclass/fpdblib.inc"--><% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
  </SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM tblPurchaseOrders_Minton_PO WHERE (PurchaseOrder =  ::PurchaseOrder::)"
fp_sDefault="PurchaseOrder=0"
fp_sNoRecords="No records returned."
fp_sDataConn="Purchase_Orders"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&PurchaseOrder=3&Requestor=202&Vendor=202&Created=202&NotToExceed=202&ConfirmedSignedPurchaseReq=202&EnteredBy=202&EnteredIntoManMan=202&POStatus=202&Comments=203&DateofManManEntry=202&DatePOClosed=202&"
fp_iDisplayCols=8
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<table BORDER="1">
  <tr>
    <td><b>PurchaseOrder:</b></td>
    <td>
    <input type="text" name="PurchaseOrder" size="20" value="<%=FP_FieldHTML(fp_rs,"PurchaseOrder")%>"></td>
  </tr>
  <tr>
    <td><b>Requestor:</b></td>
    <td>
    <input type="text" name="Requestor" size="20" value="<%=FP_FieldHTML(fp_rs,"Requestor")%>"></td>
  </tr>
  <tr>
    <td><b>Vendor:</b></td>
    <td>
    <input type="text" name="Vendor" size="20" value="<%=FP_FieldHTML(fp_rs,"Vendor")%>"></td>
  </tr>
  <tr>
    <td><b>Created:</b></td>
    <td>
    <input type="text" name="Created" size="20" value="<%=FP_FieldHTML(fp_rs,"Created")%>"></td>
  </tr>
  <tr>
    <td><b>NotToExceed:</b></td>
    <td>
    <input type="text" name="NotToExceed" size="20" value="<%=FP_FieldHTML(fp_rs,"NotToExceed")%>"></td>
  </tr>
  <tr>
    <td><b>EnteredBy:</b></td>
    <td>
    <input type="text" name="EnteredBy" size="20" value="<%=FP_FieldHTML(fp_rs,"EnteredBy")%>"></td>
  </tr>
  <tr>
    <td><b>EnteredIntoManMan:</b></td>
    <td>
    <input type="text" name="EnteredIntoManMan" size="20" value="<%=FP_FieldHTML(fp_rs,"EnteredIntoManMan")%>"></td>
  </tr>
  <tr>
    <td><b>POStatus:</b></td>
    <td>
    <input type="text" name="POStatus" size="20" value="<%=FP_FieldHTML(fp_rs,"POStatus")%>"></td>
  </tr>
</table>
<!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<p>
  <input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

</body>

</html>

(in reply to BeTheBall)
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/21/2004 10:26:43   
I think you're right. That looks like a form for submitting new records. Is it supposed to be? Do you not have another page that submits new records to the db?

_____________________________

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 styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/21/2004 11:01:43   
Yes..... All I need to do is update records....not create new ones....HELP!!!!

(in reply to BeTheBall)
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/21/2004 12:14:55   
OK, I think you might be closer that you think. Try this. Open manman_minton2.asp and swith to HTML view. Delete the entire block of red code at the top of the page down to <html>. Then save the page and retest. I assume the page titled "Update.asp" contains the code to update the record, right?

_____________________________

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 styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Criteria Restricted Subwindow Form - 6/22/2004 12:01:16   
Here is the error I am now receiving since making that change.

C:\INETPUB\WWWROOT\PURCHASE_ORDERS_INTERFACE\TRIALS\../../_fpclass/fpdbrgn2.inc, line 62


Here is the page's current code--

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>PurchaseOrder</title>
</head>

<body>

<form method="POST" action="update.asp" name="update.asp">
  <!--#include file="../../_fpclass/fpdblib.inc"--><% if 0 then %>
<SCRIPT Language="JavaScript">
  </SCRIPT>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<table BORDER="1">
  <tr>
    <td><b>PurchaseOrder:</b></td>
    <td>
    <input type="text" name="PurchaseOrder" size="20" value="<%=FP_FieldHTML(fp_rs,"PurchaseOrder")%>"></td>
  </tr>
  <tr>
    <td><b>Requestor:</b></td>
    <td>
    <input type="text" name="Requestor" size="20" value="<%=FP_FieldHTML(fp_rs,"Requestor")%>"></td>
  </tr>
  <tr>
    <td><b>Vendor:</b></td>
    <td>
    <input type="text" name="Vendor" size="20" value="<%=FP_FieldHTML(fp_rs,"Vendor")%>"></td>
  </tr>
  <tr>
    <td><b>Created:</b></td>
    <td>
    <input type="text" name="Created" size="20" value="<%=FP_FieldHTML(fp_rs,"Created")%>"></td>
  </tr>
  <tr>
    <td><b>NotToExceed:</b></td>
    <td>
    <input type="text" name="NotToExceed" size="20" value="<%=FP_FieldHTML(fp_rs,"NotToExceed")%>"></td>
  </tr>
  <tr>
    <td><b>EnteredBy:</b></td>
    <td>
    <input type="text" name="EnteredBy" size="20" value="<%=FP_FieldHTML(fp_rs,"EnteredBy")%>"></td>
  </tr>
  <tr>
    <td><b>EnteredIntoManMan:</b></td>
    <td>
    <input type="text" name="EnteredIntoManMan" size="20" value="<%=FP_FieldHTML(fp_rs,"EnteredIntoManMan")%>"></td>
  </tr>
  <tr>
    <td><b>POStatus:</b></td>
    <td>
    <input type="text" name="POStatus" size="20" value="<%=FP_FieldHTML(fp_rs,"POStatus")%>"></td>
  </tr>
</table>
<!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<p>
  <input type="submit" value="Submit" name="update.asp"><input type="reset" value="Reset" name="Reset"></p>
</form>

</body>

</html>

(in reply to BeTheBall)
BeTheBall

 

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

 
RE: Criteria Restricted Subwindow Form - 6/22/2004 12:15:02   
quote:

Delete the entire block of red code at the top of the page down to <html>.


I think you deleted some of the red code after the <html> tag. Put this code back in right after:

<!--#include file="../../_fpclass/fpdblib.inc"--><% if 0 then %>

<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
  </SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM tblPurchaseOrders_Minton_PO WHERE (PurchaseOrder =  ::PurchaseOrder::)"
fp_sDefault="PurchaseOrder=0"
fp_sNoRecords="No records returned."
fp_sDataConn="Purchase_Orders"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&PurchaseOrder=3&Requestor=202&Vendor=202&Created=202&NotToExceed=202&ConfirmedSignedPurchaseReq=202&EnteredBy=202&EnteredIntoManMan=202&POStatus=202&Comments=203&DateofManManEntry=202&DatePOClosed=202&"
fp_iDisplayCols=8
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>


_____________________________

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 styrochem)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Criteria Restricted Subwindow Form
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