thank you very much.
Here is the table from the database:
Description Design Type Price
Necklace Spiral 18 ct Gold £1,725.99
Necklace Chain 9 ct Gold £150.75
Ring Sapphire 18 ct Gold £975.00
Necklace Loop 9 ct Gold £199.50
Ring Opal 18 ct Gold £225.50
Ring Ruby Silver £180.00
Necklace Sapphire Silver £375.00
Ring Diamond Silver £379.99
Watch Wrist Platinum £99.99
Watch Wrist Rolex £2,299.99
and here the code:
Expand|Select|Wrap|Line Numbers
- <%
- Dim Connection, Recordset
- Dim sSQL, sConnString
- sSQL="SELECT * FROM table1"
- sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" &_
- "Data Source=" & Server.MapPath("Jewellerydb.mdb")
- Set connection = Server.CreateObject("ADODB.Connection")
- Set Recordset = Server.CreateObject("ADODB.Recordset")
- connection.Open sConnString
- recordset.Open sSQL,connection
- If request.form("dropdown")="Watch" Then
- Response.Write recordset("Design") & " " & recordset("Type") & " " & recordset("Price")
- ElseIf request.form("dropdown")="Necklace" Then
- Response.Write recordset("Design")
- ElseIf request.form("dropdown")="Ring" Then
- Response.Write recordset("Price")
- End if
- Recordset.Close
- Connection.Close
- Set Recordset = Nothing
- Set Connection = Nothing
- %>