<%@ LANGUAGE=JavaScript %> <% // Uma função que pode dar jeito alhures function obterConnection(BD){ var myConnection = Server.CreateObject("ADODB.Connection"); path = Server.MapPath("\\dwii\\db\\"+BD); myConnection.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" + path) return myConnection; } myConnection = obterConnection("NorthWind.mdb"); instrucaoSQL= "SELECT TOP 20 OrderId,OrderDate FROM Orders order by orderdate desc"; rs = myConnection.Execute(instrucaoSQL); %> Encomendas

Encomendas Northwind

(Só as primeiras 20)

<% while(!rs.eof){%> <% rs.MoveNext(); } %>
NúmeroData
<%=rs("OrderId")%> <%=rs("OrderDate")%>
<% rs.Close(); myConnection.Close(); %>