先在IF前定义2个变量用来接收值:
dim username as string,pwd as string
username=txtusername.text
pwd=密码控件名.text
再在adoRs=adocon.execute(strSql)写:
Do while not adors.eof
if adors(0) <> username then
adors.movenext
elseif adors(1)<>pwd then
msgbox "密码错误之类的话"
exit do
end if
if adors.eof then
msgbox "没有此用户之类的话"
else
关闭记录集
关闭连接
窗体.show
end if
loop
dim username as string,pwd as string
username=txtusername.text
pwd=密码控件名.text
再在adoRs=adocon.execute(strSql)写:
Do while not adors.eof
if adors(0) <> username then
adors.movenext
elseif adors(1)<>pwd then
msgbox "密码错误之类的话"
exit do
end if
if adors.eof then
msgbox "没有此用户之类的话"
else
关闭记录集
关闭连接
窗体.show
end if
loop
解决方案 »
- 数据库迁移时登录名无法迁移
- SQL问题
- 让初级的操作员经常性的最快捷的执行DTS包的方法是什么?
- 怎么把DATA_Data.MDF和DATA_Log.LDF导入数据库.
- 小弟没办法了 明天交项目了 收藏 不显示删除回复显示所有回复显示星级回复显示得分回复 有个数据库的表,需用Excel要往里面导入数据,怎么实现?
- 求教将数据库查询出的结果再插入本表其他列的方法。
- 读取excel数据不好使
- 新手问:存储过程的问题
- 这个问题如何解决呢??(给分)
- 当我们插入数据时......
- 请问在sqlserver2000中,我有什么方法能给sp传入一个临时表用??
- 求求求:::::以空格为界将某列分割成三个新列的方法
dim username as string,pwd as string
username=txtusername.text
pwd=密码控件名.text
再在adoRs=adocon.execute(strSql)写:
Do while not adors.eof
if adors(0) <> username then
adors.movenext
elseif adors(1)<>pwd then
msgbox "密码错误之类的话"
exit do
end if
loop
if adors.eof then
msgbox "没有此用户之类的话"
else
关闭记录集
关闭连接
窗体.show
end if