<%@ page language=vb debug=true %>
<%@ import namespace="system.data" %>
<%@ import namespace="system.data.oledb" %>
<script runat=server>
sub page_load(byval sender as object, byval e as eventargs)
dim dbconn as oledbconnection
dim dbcommand as oledbdataadapter
dim dspagedata as new dataset
dim i as long
dbconn = new oledbconnection( _
"provider=microsoft.jet.oledb.4.0;" _
& "data source=" _
& server.mappath("employeedatabase.mdb;"))
dbcommand = new oledbdataadapter _
("select * from employee", dbconn)
dbcommand.fill(dspagedata, _
"employee")
for i = 0 to _
dspagedata.tables("employee").rows.count - 1
'code to process record
lblmessage.text = lblmessage.text _
& "<br>proces
sed record: " _
& dspagedata.tables("employee"). _
rows(i).item("id")
next
end sub
</script>
<html>
<head>
<title>在访问表中遍历记录-www.jb200.com</title>
</head>
<body leftmargin="40">
<form runat="server">
<br><br>
<asp:label
id="lblmessage"
runat="server"
/>
</form>
</body>
</html>