Exemplo Prático (2)
•<HTML>
•<HEAD>
•<TITLE>Exemplo de Página ASP</TITLE>
•</HEAD>
•<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
•<DIV ALIGN=CENTER>
•<H1>Clientes</H1>
•<%
•Dim conn, rs, strSQL
•' Conectando ao banco de dados
•set conn = server.CreateObject("ADODB.Connection")
•conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
• "Data Source=C:\develop\web\dados\nwind.mdb;" & _
• "Mode=ReadWrite;Persist Security Info=False"
•' Recuperando dados através de um recordset
•strSQL = "SELECT CompanyName, ContactName, Phone " & _
• "From Customers Order By CompanyName"
•set rs = server.CreateObject("ADODB.Recordset")
•rs.Open strSQL, conn