怎么样把SQL里的用户名和密码连接到VB的登录框?

ddnian 2004-07-20 05:18:57
就是登录框用COMBOX1下拉选取用户名,同时在SQL里面我做好了用户和密码的表,
请问怎么连接??
谢谢!
...全文
161 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
ryuginka 2004-07-23
  • 打赏
  • 举报
回复
都说了,我看看吧
winjet 2004-07-23
  • 打赏
  • 举报
回复
up
cqm2099 2004-07-23
  • 打赏
  • 举报
回复
UP
落伍者 2004-07-20
  • 打赏
  • 举报
回复
sub combo1_click()
dim strsql as string
strsql="select password,userid from user where userid='"& combo1.text
rs.open strsql,cn,3,3
if not (rs.eof and rs.bof) then
'比较密码

end if

end sub
ddnian 2004-07-20
  • 打赏
  • 举报
回复
加载COMBO1里的用户名我在FROM—LOAD里就加载好了
现在我只要选取一个用户名就能和我创建的表里的密码相同就行了!!
zhouheng123456 2004-07-20
  • 打赏
  • 举报
回复
combo1.text="****"
while rs.eof=false
mbo1.additem rs.fieds(i).value
rs.movenext
loop
online 2004-07-20
  • 打赏
  • 举报
回复
先检索数据库,然后填充combo
rs.open "select * from users",cn,1,3
for i=0 to rs.roundcount-1
combo1.additem rs("username")
rs.movenext
next
ddnian 2004-07-20
  • 打赏
  • 举报
回复
SQLstr="select count(*) from user where userid='"& combo1.text &"' and userpwd='"& text1.text &"'"
这样写对吗?

1,217

社区成员

发帖
与我相关
我的任务
社区描述
VB 数据库(包含打印,安装,报表)
社区管理员
  • 数据库(包含打印,安装,报表)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧