<!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>
</head>
<body>
<%
'連接OLEDB
Set oConn = Server.CreateObject("ADODB.CONNECTION")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("data/abc.mdb")
action = request("action") '判斷提交動作,
if action = "tj" then
username = request("username") '檢索提交過來的名稱
set rrs = server.CreateObject("adodb.recordset")
strSQL = "select name from [name] where name = '" & username & "'"
rrs.open strSQL ,conn ,1 ,1
if not rrs.eof then
response.Write("輸入正確" & username)
else
response.Write("輸入錯誤")
response.End()
end if
rrs.close
set rrs = nothing
end if
%>
<form method="post" action="?action=tj">
<input type="text" value="" name="username">
<input type="submit" value="修改" />
</form>
</body>
</html>