Eccolo...grazie 1000 stavo impazzendo
codice:
<%@ Language=VBScript %>
<% Option Explicit %>
<%
' -----------------------------------------------------------------
' Controllo se trattasi di utente autenticato
if Session("autenticato") <>"OK" then
Response.Redirect("index.asp")
end if
' -----------------------------------------------------------------
' Creo variabili per la Connessione ed il Recordset
Dim cn
Dim rs
' Creo un istanza per la Connessione ed una per il Recordset
Set cn= Server.CreateObject("ADODB.Connection")
Set rs= Server.CreateObject("ADODB.Recordset")
' Apro la connessione al Database
cn.Open "driver={Microsoft access Driver (*.mdb)};dbq=" & Server.mappath("\Tutorial\Appoggio.mdb")
' -----------------------------------------------------------------
' Creo la query SQL
Dim Query_Partner
Query_Partner ="Select distinct partner from regione order by partner"
' Creo variabile (contenente la stringa della select sel_dati_partner) che utilizzo nella Query_Regione
Dim var_dato_partner
var_dato_partner=request.querystring("sel_dati_partner")
' Creo le query SQL
Dim Query_Regione
Query_Regione = "Select regione from regione where partner='"&var_dato_partner&"' order by regione Asc"
Dim var_dato_regione
var_dato_regione=request.querystring("sel_dati_regione")
Dim Query_Prodotti
Query_Prodotti = "Select prodotti from prodotti order by prodotti Asc"
Dim var_dato_prodotti
var_dato_prodotti=request.querystring("sel_dati_prodotti")
%>
<HTML>
<HEAD>
<TITLE> AREA RISERVATA </TITLE>
</HEAD>
<BODY BGCOLOR=#BBBBFF>
<DIV ALIGN=CENTER><H1>PAGINA RISERVATA</H1>
<DIV ALIGN=CENTER><H2>UTENTE AUTENTICATO</H2>
</DIV>
<table align= left border=1>
<TR>
<TD>PARTNER
</TD><TD>REGIONE
</TD><TD>PRODOTTO
</TD></TR>
<TR>
<TD>
<FORM <% if var_dato_partner <>"" and var_dato_regione <>"" and var_dato_prodotti <>"" then %> name="form_dati_tdb" action="prova_dati.asp" method="post"<%end if %>>
<%
' -------------------------------------------------------
' Apro il Recordset
rs.Open Query_Partner, cn
' Verifico che la tabella contenga dati
' Se non contiene dati invio un messaggio di avviso
if rs.EOF = True Then
%>
Dati non trovati</p>
<%
' Se invece contiene dati visualizzo i dati in funzione
' della query SQL specificata
else
while rs.EOF = False
%>
<INPUT TYPE="RADIO" name="sel_dati_partner" value="<%=rs("Partner")%>" onclick="submit(this)" <% if var_dato_partner=rs("Partner") then %> selected="selected" <%end if%>><%=rs("Partner")%>
<% rs.MoveNext
Wend
End if
' Chiudo il Recordset
rs.Close
%>
</TD>
<TD>
<%
' --------------------------------------------------------
' Apro il Recordset
rs.Open Query_Regione, cn
' Verifico che la tabella contenga dati
' Se non contiene dati invio un messaggio di avviso
if rs.EOF = True Then
%>
Dati non trovati</p>
<%
' Se invece contiene dati visualizzo i dati in funzione
' della query SQL specificata
else
while rs.EOF = False
%>
<INPUT TYPE="RADIO" name="sel_dati_regione" value="<%=rs("regione")%>" onclick="submit(this)" <% if var_dato_regione=rs("regione") then %> selected="selected" <%end if%>><%=rs("regione")%>
<%
rs.MoveNext
Wend
End if
' Chiudo il Recordset
rs.Close
%>
</TD>
<TD>
<%
' -------------------------------------------------------
' Apro il Recordset
rs.Open Query_Prodotti, cn
' Verifico che la tabella contenga dati
' Se non contiene dati invio un messaggio di avviso
if rs.EOF = True Then
%>
Dati non trovati</p>
<%
' Se invece contiene dati visualizzo i dati in funzione
' della query SQL specificata
else
while rs.EOF = False
%>
<INPUT TYPE="RADIO" name="sel_dati_prodotti" value="<%=rs("Prodotti")%>" selected="selected"><%=rs("Prodotti")%>
<% rs.MoveNext
Wend
End if
' Chiudo il Recordset
rs.Close
cn.close
Set cn= nothing
%>
</td>
<TD>
<input type="submit" name="click" value="CLICK">
</FORM>
<TD/>
<%
' Chiudo il Recordset
' rs.Close
%>