Contents

 
Home
ASPRunner Professional 7.0 manual
Prev Page Next Page
 
 

Show list of customer orders

 

Show list of all orders placed by this customer on Orders Edit page (sample Northwind database in MS Access).

Use toolbar_snippet (Insert ASP code snippet) button to add this event on the Visual Editor page.

yellowbulbNote: Change the values listed in red to match your specific needs.

set rstmp = dal.Table("orders").Query("OrderID=" &
request.querystring("editid1"),"")
 CustomerID = rstmp("CustomerID")
 rstmp.Close : set rstmp = nothing
 response.write "Orders placed by " & customerid & "<br>"
set rsOrders = dal.Table("orders").Query("customerid='" & customerid & "'","")
 
do while not rsOrders.eof
   response.write "<a target=_blank href=Orders_edit.asp?editid=" &_
 rsOrders("OrderID") & ">" & rsOrders("OrderID") & "</a> " &
rsOrders("OrderDate") & "<br>"
   rsOrders.MoveNext
loop
 rsOrders.Close : set rsOrders = nothing

For more information about using Data Access Layer (DAL), see Data Access Layer.

Converted from CHM to HTML with chm2web Standard 2.85 (unicode)