<% Param = Request.QueryString("Param") Data = Request.QueryString("Data") %> <% Session.timeout = 1 If IsObject(Session("persone_conn")) Then Set conn = Session("persone_conn") Else Set conn = Server.CreateObject("ADODB.Connection") conn.open "persone","","" Set Session("persone_conn") = conn End If %> <% sql = "SELECT * FROM [Sampledb1]" If cstr(Param) <> "" And cstr(Data) <> "" Then sql = sql & " WHERE [" & cstr(Param) & "] = " & cstr(Data) End If Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sql, conn, 3, 3 %> <% On Error Resume Next rs.MoveFirst do while Not rs.eof %> <% rs.MoveNext loop%>
Lista delle persone
Nome Tel Email
<%If rs.Fields("homepage").Value <> "" Then response.write("")%> <%=Server.HTMLEncode(rs.Fields("Cognome").Value)%>  <%=Server.HTMLEncode(rs.Fields("Nome").Value)%> <%If rs.Fields("homepage").Value <> "" Then response.write("")%>
<%=Server.HTMLEncode(rs.Fields("Tel").Value)%>
<%If rs.Fields("Email").Value <> "" Then response.write("")%> <%=Server.HTMLEncode(rs.Fields("Email").Value)%> <%If rs.Fields("Email").Value <> "" Then response.write("")%>