However i cant seem to make it work, im using the dictionary to add items to an array however it has now stopping even showing one item.
Expand|Select|Wrap|Line Numbers
- <html>
- <body>
- <%
- Dim id
- Dim conn
- Dim product
- Dim sql
- Dim Title
- If Request.querystring("product_ID") Then
- id = Request.querystring("product_ID")
- set d=Server.CreateObject("Scripting.Dictionary")
- Set conn=server.createobject("ADODB.Connection")
- conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("20509703.mdb")
- Set product = Server.CreateObject("ADODB.Recordset")
- sql="Select * from products where product_ID="&id
- product.Open sql, conn
- session("Title") = product("PName")
- Title = session("Title")
- Do while id <> ""
- d.Add id, Title
- Loop
- End If
- Response.Write(d.Key)
- 'remove all the items
- d.RemoveAll
- 'free up resources
- set dt=nothing
- %>
- </body>
- </html