cheap nfl jerseys china cheap nfl jerseys free shipping wholesale nfl jerseys china wholesale jerseys from china cheap nfl jerseys free shipping cheap nfl jerseys for sale cheap jerseys free shipping wholesale nfl jerseys from china cheap nfl jerseys sale cheap nike nfl jerseys china wholesale jerseys free shipping cheap nfl jerseys wholesale wholesale nfl jerseys online cheap nfl jerseys wholesale china jerseys wholesale cheap coach handbags outlet authentic designer handbags cheap coach handbags outlet cheap coach purses outlet discount coach bags coach bags sale coach purse outlet cheap real coach purses coach handbags sale online coach purse outlet michael kors outlet online store cheap michael kors bags cheap michael kors purse michael kors factory outlet online cheap michael kors handbags cheap michael kors purses michael kors bags outlet online cheap michael kors purse michael kors handbags discount

Seminario introduttivo

1999 Roberto Anzellotti  - CASPUR

Interrogazione di Basi Dati tramite ASP-2

Quella che segue � una semplice interrogazione dati fatta tramite ASP. Della tabella SQL_Elenco vengono richiesti tutti i campi generando poi una pagina HTML.
La pagina ASP originale � la seguente:

<HTML>
<BODY BACKGROUND="/sfondi/Image2.jpg" BGCOLOR="WHITE" VLINK="#646464" TEXT="GREEN" LINK="#C850C8">

<CENTER>
<B><FONT FACE="Comic Sans MS" SIZE=5 COLOR="#6464FF">Stampa di prova Tabella SQL_Elenco</FONT></B>
<P>

<%Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "Universo","web",""

sql="SELECT * FROM SQL_Elenco"
Set RS = Conn.Execute(sql)%>

Interrogazione effettuata:<BR><I><B> <%=sql%></I></B>
<P>
<TABLE BORDER=1><TR>

<% For i = 0 to RS.Fields.Count - 1 %>
    <TD><B><% = RS(i).Name %></B></TD>
   <% Next %>
</TR>

<%  Do While Not RS.EOF %>
      <TR>
      <%  For i = 0 to RS.Fields.Count - 1 %>
           <TD VALIGN=TOP><%  = RS(i) %></TD>
      <%  Next %>
      </TR>
     <% RS.MoveNext
Loop
RS.Close
Conn.Close%>


</TABLE>
<BR><BR></BODY>
</HTML>

Clicca qu� per vedere il risultato dell'ASP

Svantaggi dell'interrogazione con ASP:
E' pi� difficile scrivere il codice (ma non molto!)

Vantaggi dell'interrogazione con ASP:
Se ben preparato, tutto il codice � riusabile!

Pagina precedente

Indice

Pagina successiva