Ho creato una SELECT che legge i dati da una tabella (REGIONE):
'lettura dati
set RsQua_REGIONE = Server.CreateObject("ADODB.Recordset")
sql = "select Comune.Regione from Comune GROUP BY Comune.Regione ORDER BY Comune.Regione"
RsQua_REGIONE.open sql, connobj
'selezione REGIONE
<select name="REGIONE" id="REGIONE" style="width:206px">
<% while not RsQua_REGIONE.eof %>
<option><%=RsQua_REGIONE("Regione")%></option>
<% RsQua_REGIONE.movenext
wend %>
</select>
Quindi ho creato un'altra SELECT che dovrebbe prendere i dati (PROVINCIA)tenendo conto di quello selezionato nella lista precedente (REGIONE):
'lettura dati
set RsQua_PROVINCIA = Server.CreateObject("ADODB.Recordset")
sql = "SELECT Comune.PV FROM Comune WHERE (Comune.Regione=regione_selezionata) GROUP BY Comune.PV ORDER BY Comune.PV; "
RsQua_PROVINCIA.open sql, connobj
'selezione PROVINCIA
<select name="PROVINCIA" id="PROVINCIA" style="width:206px" disabled>
<% while not RsQua_PROVINCIA.eof %>
<option><%=RsQua_PROVINCIA("PV")%></option>
<% RsQua_PROVINCIA.movenext
wend %>
</select>
Come si può fare???
Grazie.
Vincenzo