Dynamic navigation bar, that takes the values from an Access database.
First of all create a database table with menu voices and links.
The script creates a list of links separated by "|" symbol.
<%
Dim adoCon
Dim adoRst
'connection
Set adoCon = Server.CreateObject("ADODB.Connection")
'recordset
Set adoRst = Server.CreateObject("ADODB.Recordset")
'open DB connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\mdb-database\menu.mdb")
'select all menu voices
adoRst.Open "SELECT * FROM Menu ORDER BY Indice;", adoCon
While Not adoRst.EOF
Response.Write("<A HREF='" & adoRst("Link") & "'>" & adoRst("Titolo") & "</A>") 'Stampo il menu
'next record
adoRst.MoveNext
if not adoRst.Eof Then
'print "|" symbol
Response.Write " | ")
End If
Wend
'close all objects
adoRst.Close
adoCon.Close
'Delete references
Set adoCon = Nothing
Set adoRst = Nothing
%>