<
%@Import
Namespace =
Namespace=System.Data.OleDb%>
<%@Import Namespace =Namespace=System.Data%>
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="vb" runat="server">
Dim conn As OleDb.OleDbConnection
Dim comm As OleDbCommand
Dim rs As OleDb.OleDbdatareader
Sub page_load()sub page_load(sender as Object,e as EventArgs)
conn = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e: etdbcs.mdb")
'conn = New OleDb.OleDbConnection("Provider=Microsoft.ACE.oledb.12.0;Data source=e: etdbcs.accdb")
conn.open()
comm = New OleDbCommand( "select * from userlist", conn )
rs = comm.Executereader()
dim showcont as string
do while rs.read()
showcont += rs("username") & "----" & rs("tpnum") & "<br/>"
loop
show.innerHTML = showcont
rs.close()
rs=nothing
comm=nothing
conn.close()
conn=nothing
end sub
</script>
</head>
<body>
<span id="show" runat="server"/>
</body>
</html>
<%@Import Namespace =Namespace=System.Data%>
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="vb" runat="server">
Dim conn As OleDb.OleDbConnection
Dim comm As OleDbCommand
Dim rs As OleDb.OleDbdatareader
Sub page_load()sub page_load(sender as Object,e as EventArgs)
conn = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e: etdbcs.mdb")
'conn = New OleDb.OleDbConnection("Provider=Microsoft.ACE.oledb.12.0;Data source=e: etdbcs.accdb")
conn.open()
comm = New OleDbCommand( "select * from userlist", conn )
rs = comm.Executereader()
dim showcont as string
do while rs.read()
showcont += rs("username") & "----" & rs("tpnum") & "<br/>"
loop
show.innerHTML = showcont
rs.close()
rs=nothing
comm=nothing
conn.close()
conn=nothing
end sub
</script>
</head>
<body>
<span id="show" runat="server"/>
</body>
</html>