asp教程 讀取數據庫教程記錄
<%
'
Dpath ="www.3lian.net/dbaseMateyDBWeb_^%$#@.mdb"
Set Conn=Server.CreateObject("Adodb.connection")
if request.QueryString("action")="list" then
Set Rs =Server.CreateObject("Adodb.Recordset")
Conn.connectionstring="Provider=Microsoft.Jet.oledb.4.0;Data source="&Server.MapPath(Dpath)
Conn.open
Dim sql
sql ="select * from test id= "&request.QueryString("id")
rs.open sql,conn,1,3
end if
%>
<input name="uid" type="text" id="uid" value="<%=rs("uid")%>">
用戶名
<input name="pwd" type="text" id="pwd" value="<%=rs("pwd")%>">
密碼
</p>
<table width="361" border="0">
<tr>
<td width="265">地址</td>
<td width="86">操作</td>
</tr>
<tr>
<td>www.111cn.net</td>
<td><a href="?id=2">查看</a></td>
</tr>
</table>