<%
Dim conn
Dim connstr
Dim sqlCmd
Dim userName
userName=Request
set conn=server
connstr="Provider=Microsoft
conn
set rs=server
sqlCmd="select id from user where userName=
rs=conn
//定義變量表示用戶名是否存在
Dim exist
//根據是否有數據判斷用戶名是否存在
if rs
//關閉數據庫連接
rs
conn
set rs=nothing
set conn=nothing
//將結果返回
Response
%>
From:http://tw.wingwit.com/Article/program/net/201311/14060.html