%@ 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); %>
(Só as primeiras 20)
Número | Data |
---|---|
<%=rs("OrderId")%> | <%=rs("OrderDate")%> |