|
Show list of all orders placed by this customer on Orders Edit
page (sample Northwind database in MS Access).
Use (Insert ASP code snippet) button
to add this event on the Visual
Editor page.
Note: 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.
|