标题:[求助]这个程序的错误在那里?
只看楼主
kongyi22
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2006-3-24
 问题点数:0 回复次数:1 
[求助]这个程序的错误在那里?

<%@import namespace="system.data"%>
<%@import namespace="system.data.sqlclient"%>
<script language="vb" runat="server">
sub denglu_click(sender as object, e as eventargs)
dim mystring as string
dim myconnection as sqlconnection
mystring="server=localhost;uid=sa;pwd=;database=zhaopin"
myconnection=new sqlconnection(mystring)
myconnection.open
dim ds as dataset
dim drow as datarow
dim dtable as datatable
dim coldrow as datarowcollection
dim myadapter as new sqldataadapter("select userid from userinfo where

userid='"&request.form("zhanghao")&"'and userpsw='"&request.form("mima")&"'",myconnection)
myadapter.fill(ds,"tabuserinfo")
dtable=ds.tables("tabuserinfo")
coldrow=dtable.rows
if coldrow.count<>0 then
response.redirect("mainframe.aspx")
else
response.write("好")
end if
myconnection.close
end sub
</script>
<html>
<body>
<form runat="server">
<p><font size="5">帐号:
<input type="text" id="zhanghao" runat="server"></font>
</p>
<p><font size="5">密码:
<input type="password" id="mima" runat="server"></font>
</p>
<font size="5"><input type="button" runat="server" value="登&nbsp;陆"

onserverclick="denglu_click"></font>
</form>
</body>
</html>

搜索更多相关主题的帖子: localhost database blank zhaopin server 
2006-03-24 19:27
红云
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2005-11-11
得分:0 
哥们  no  problem
2006-03-31 23:10



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




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

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