Non mi funziona, questo è il codice che sto usando:
codice:
<%
MM_connDUgallery_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../mdb-database/amministrazione.mdb") %>
<%
set rsCat = Server.CreateObject("ADODB.Recordset")
rsCat.ActiveConnection = MM_connDUgallery_STRING
rsCat.Source = "SELECT * FROM aree ORDER BY Area"
rsCat.CursorType = 0
rsCat.CursorLocation = 2
rsCat.LockType = 3
rsCat.Open()
rsCat_numRows = 0
%>
<%
set RecCat = Server.CreateObject("ADODB.Recordset")
RecCat.ActiveConnection = MM_connDUgallery_STRING
RecCat.Source = "SELECT * FROM sottocat ORDER BY Id_area"
RecCat.CursorType = 0
RecCat.CursorLocation = 2
RecCat.LockType = 3
RecCat.Open()
RecCat_numRows = 0
%>
<body>
<form method="POST" action="dati.asp">
<select name="Id_area" class="Fields">
<% While (NOT rsCat.EOF) %>
<option value="<%=(rsCat.Fields.Item("Id_area").Value)%>" >
<%=(rsCat.Fields.Item("Area").Value)%></option>
<% rsCat.MoveNext()
Wend
If (rsCat.CursorType > 0) Then
rsCat.MoveFirst
Else
rsCat.Requery
End If
%>
</select>
<option value="<%=(RecCat.Fields.Item("Id_Sottocat").Value)%>" >
<%=(RecCat.Fields.Item("NOME Sottocat").Value)%></option>
<% RecCat.MoveNext()
Wend
If (RecCat.CursorType > 0) Then
RecCat.MoveFirst
Else
RecCat.Requery
End If
%>
</select>
<input type="text" name="dati">
</form>
Mi restituisce il seguente errore:
Errore di compilazione di Microsoft JScript (0x800A03EC)
Previsto ';'
set rsCat = Server.CreateObject("ADODB.Recordset")