标题:請大俠幫忙查錯!(汗,自己改了改了一下午了!還是沒有改好!_
只看楼主
xunmi_love
Rank: 2
等 级:论坛游民
帖 子:204
专家分:18
注 册:2006-10-14
结帖率:57.14%
 问题点数:0 回复次数:0 
請大俠幫忙查錯!(汗,自己改了改了一下午了!還是沒有改好!_
<script runat="server" language="vb">
sub page_load(obj as object,e as Eventargs)
dim conn as OleDbConnection
dim rs as OledbCommand
dim oc as OledbDataReader
conn = new OleDbCOnnection("Provider = Microsoft.Jet.OleDb.4.0;data source="& server.MapPath("data/liyong.mdb"))
conn.open()
rs = new OleDbCommand("select count(*) from [User] where name='123'",conn)
rs.Connection.Open()
dim i as integer
i=rs.ExecuteScalar()
rs.Connection.Close()
label2.textl = i
if i > 0 then
label1.text = "你的用戶名被別人用了"
else
label1.text = "用戶名可用"
end if
conn.Close()
end sub
</script>

只是判斷一下看有多少個用這個名子的人,並顯示也數字!
搜索更多相关主题的帖子: Microsoft dim conn Connection 
2008-06-20 14:45



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-220220-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.045925 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved