Grazie mille, risolto il problema della relazione... adesso però devo spostare in asp quanto detto ed ho scritto:
codice:
<%
pagina = request.servervariables("path_info")
id = request.querystring("id")
if len(id) > 0 and isnumeric(id) then
id = clng(id)
else
id = 0
end if
set conn = server.createobject("adodb.connection")
conn.open "DRIVER={Microsoft Access Driver (*.mdb)};" &_
"DBQ="& Server.MapPath("lond.mdb")
sql = "select * from tabella_A order by Nome"
set rs = conn.execute(sql)
Function ConvertiData(data)
giorno = Mid(data, InStr(1, data, "/") + 1, InStrRev(data, "/") - InStr(1, data, "/") - 1)
mese = Left(data, InStr(1, data, "/") - 1)
anno = Right(data, Len(data) - InStrRev(data, "/"))
ConvertiData = giorno & "/" & mese & "/" & anno
End Function
if not rs.eof then
%>
<% do until rs.eof %>
<option value="<%=pagina%>?id=<%=rs("ID")%>"<% if rs("ID") = id then %> selected<% end if %>><%=rs("Nome")%></option>
<%
rs.movenext
loop
end if
%>
</select>
<%
rs.close
set rs = nothing
if ID > 0 then
sql = "select * from tabella_B where ID = " & ID
set rs = conn.execute(sql)
if not rs.eof then
DATA = ConvertiData(CStr(RS("DATA")))
%>
<h1><%=rs("Nome")%></h1>
ID: <%=rs("Nome")%>
Data: <%=DATA%>
<%
end if
end if
rs.close
set rs = nothing
end if 'fine if id > 0 then
conn.close
set conn = nothing
%>
ma restituisce errore alla riga 84:
Microsoft VBScript compilation error '800a0400'
Expected statement
codice:
end if 'fine if id > 0 then
se elimino la riga 84:
Microsoft VBScript runtime error '800a01a8'
Object required: 'rs'
riga 81: