<%
Dim maxid ()
Set the conn=Server. CreateObject (" ADODB. Connection ")
Conn. Open="DRIVER={Microsoft Access DRIVER (*. MDB)}; DBQ="& amp; Server. MapPath (" SJXT. MDB)
Set the rs=server. Createobject (" adodb. You ")
Sql1="select z_zhjddw from _zb order by id asc"
Rs. The open sql1, conn, 1, 1
For I=0 To rs. Recordcount
Maxid (I)=rs (I)
Next
Rs. Close
Conn. Close
% & gt;
Then one by one display
<% % next & gt;
Excuse me, I was wrong in there? How to write?
CodePudding user response:
<body>
<% set conn=Server. The CreateObject (" ADODB. Connection ")
Conn. The Provider="Microsoft. Jet. The OLEDB. 4.0" conn. Open (for Server Mappath ("/db/northwind. MDB))
Set the rs=Server CreateObject (" ADODB. You ") rs. Open the "select z_zhjddw from _zb order by id asc", conn
% & gt;
<% % for each x in rs. The Fields & gt;
<% next
Rs. MoveNext % & gt;
<% loop
Rs. Close
Conn. Close
% & gt;