sinistapenguin
Technical User
Hi All
This is hopefully my last question for my current project.
The problem is one that I know has been addressed many times on these forums and various tutorial websites, but I can’t find the answer now I need it (well not one that I can get to work anyway):
I have a form which has a number of text fields and hidden fields. From this form I need to insert some fields into one table whilst updating 2 other tables with some other fields.
I would like all the above to happen when I click the submit button.
I have the following: (hf = hidden field)
hfInvoiceNo – hfOrderNo – hfWarehouse – txtStockCode – hfQty(stores calculation result) – hfToFollow – txtPrice – txtVAT – txtTotal
I need to insert InvoiceNo, OrderNo, StockCode, Price, VAT, Total into my Invoice_Line table
I need to update Qty in my Stock_Location table with hfQty where WarehouseID = hfWarehouse and where StockCode = txtStockCode
I also need to update Qty in Order_Line with hfQty where OrderNo = hfOrderNo and StockCode = txtStockCode.
I realise that what I’ve just written is almost the SQL script I would use for a SP, but I can’t seem to get it to work. Could it be something to do with the position of the SP within the code? I can’t see why though, because although some of the fields aren’t populated to begin with, they are all populated by the time the submit button is pressed.
Any help gratefully received.
Thanks
Sinista
This is hopefully my last question for my current project.
The problem is one that I know has been addressed many times on these forums and various tutorial websites, but I can’t find the answer now I need it (well not one that I can get to work anyway):
I have a form which has a number of text fields and hidden fields. From this form I need to insert some fields into one table whilst updating 2 other tables with some other fields.
I would like all the above to happen when I click the submit button.
I have the following: (hf = hidden field)
hfInvoiceNo – hfOrderNo – hfWarehouse – txtStockCode – hfQty(stores calculation result) – hfToFollow – txtPrice – txtVAT – txtTotal
I need to insert InvoiceNo, OrderNo, StockCode, Price, VAT, Total into my Invoice_Line table
I need to update Qty in my Stock_Location table with hfQty where WarehouseID = hfWarehouse and where StockCode = txtStockCode
I also need to update Qty in Order_Line with hfQty where OrderNo = hfOrderNo and StockCode = txtStockCode.
I realise that what I’ve just written is almost the SQL script I would use for a SP, but I can’t seem to get it to work. Could it be something to do with the position of the SP within the code? I can’t see why though, because although some of the fields aren’t populated to begin with, they are all populated by the time the submit button is pressed.
Any help gratefully received.
Thanks
Sinista