<% intItemID = request.querystring("ItemID") 'response.write "

Item ID is " & intItemID & "

" %>
<% Set objCmd = Server.CreateObject("ADODB.Command") objCmd.CommandType = adCmdStoredProc objCmd.CommandText = "usp_InventoryDetail" objcmd.Parameters.append objcmd.createparameter("@ItemID",adinteger,adParamInput,2,intItemID) objCmd.ActiveConnection = stConn set rs = objCmd.Execute Set objCmd = Nothing if err <> 0 or (rs.EOF and rs.BOF) then response.write "

No items for display at the moment.

" else stItemName = rs("itemName") stBuyNow = rs("itemBuyNow") response.write "

" & stItemName & "

" response.write "" response.write rs("itemDescription") set rs=rs.nextrecordset if intItemID = "14" then 'was =14 - used for special cases -6 is for HOwliday cards 'response.write "we are checking out using the new button
" %>
2017 Howliday Card
<% elseif stBuyNow = 1 then 'no options response.write "

" & formatCurrency(rs("price")) & "

" %>

">

<% elseif stBuyNow <> 1 then 'one option 'response.write "
" while not rs.eof stProduct = stItemName & " - " & rs("colour") & " - " & rs("size") ' response.write "Product is " & stProduct & "
" ' response.write "

" & rs("size") & " - " & formatCurrency(rs("price")) %>


<%=rs("colour")%>: <%=rs("size")%> - <%=formatCurrency(rs("price"))%>     ">


<% rs.movenext wend 'response.write "
" ' else 'This is code for testing loading of values into the arrays from data retrieved from the database - it doesn't work. ' bOK = LoadArrays("M","Green") ' while not rs.EOF ' sParentID = rs("Size") ' sDescription = rs("Colour") ' bOK = LoadArrays(sParentID,sDescription) ' response.write "
  • Colour: " & rs("Colour") & "
  • Size: " & rs("Size") & "
  • " ' response.write "
  • Price: " & rs("Price") & "
  • Quantity: " & rs("Quantity") & "
" ' rs.movenext ' wend end if end if %>