Hi, I am quite new to frontpage and SQL but I have a Stock Control
access database / frontpage to set up. My last problem deals with the
automatic updating of the total quantity of stock with parts move in or
out of the warehouse. The following shows my page layout
(i posted this on the frontpage group, but I think their level is too
high for my skills, since i use the DRR most of the time)
I have form.htm that asks the user for two things - StockCode and QtyIN
i pass these values to form.asp via POST with action form.asp
form.asp contains a DRR query: SELECT Qty FROM totalQty WHERE StockCode
= '::StockCode::'
i have to capture the QTY value as a variable - so i am using session
variables. My problem is I do not know what value to assign to the
variable. At the moment I have
<%
dim strOldQty
strOldQty = FP_FieldVal(fp_rs,"Qty")
session("OldQty") = strOldQty
%>
but this seems NOT to work.
on the same form.asp is an inserted web component page called send.asp
send.asp has a form with a submit button and settings to send the data
to a database. the advanced (hidden) options include the two variables
StockCode and QtyIN via <%=request.form("QtyIN")%> which i
know works for sure when i tested it separately to send one table to
two different databases.
the confirmation page of send.asp (accessed from form.asp) is another
page, final.asp
final.asp has the database results region with a query for an UPDATE
statement.
UPDATE totalQty
SET Qty = strQtyIN + strOldQty
WHERE StockCode = strStockCode
there is then a link on final.asp to return to the homepage.
there are two main problems left in this:
1) how to assign the correct value from the custom query to the session
variable.
2) how to assign StockCode and Qty to session variables on form.htm
I currently have:
<%
dim strStockCode, strQty
strStockCode = request.form("StockCode")
strQty = request.form("Qty")
session("StockCode") = strStockCode
session("Qty") = strQty
%>
I am using session variables because I have attempted to pass hidden
variable with no success.
it would help a lot if you can tell me where to input your suggested
code as sometimes frontpage does not allow me to alter the code.
I hope i made this complicated web structure somewhat easy to follow
i know i have a lot of questions, but your help is greatly appreciated
omar K