‘includiamo il file adovbs.inc che si trova nella directory corrente <%@ Language=VBScript %> <% Response.Buffer=True %> Visualizzazione contenuto tabella AnagraficaStudenti <% On Error Resume Next Dim RecSet Set RecSet = Server.CreateObject("ADODB.RecordSet") ‘Si modifica il tipo di bloccaggio predefinito RecSet.Open "AnagraficaStudenti", Conn, , adLockOptimistic, adCmdTable RecSet.AddNew RecSet("Cognome") = "Gialli" RecSet("Nome") = "Davide" RecSet("Indirizzo") = "Via G. Leopardi, 20" RecSet("CAP") = "73100" RecSet("Città") = "Lecce" RecSet.Update RecSet.MoveFirst Do While Not RecSet.EOF %> <% RecSet.MoveNext Loop RecSet.Close Conn.Close Set RecSet = Nothing Set Conn = Nothing %>
ID Studente Cognome Nome Indirizzo Cap Città
<%Response.Write RecSet("CodiceStudente")%> <%Response.Write RecSet("Cognome")%> <%Response.Write RecSet("Nome")%> <%Response.Write RecSet("Indirizzo")%> <%Response.Write RecSet("Cap")%> <%Response.Write RecSet("Città")%>