怎么样把SQL里的用户名和密码连接到VB的登录框? 就是登录框用COMBOX1下拉选取用户名,同时在SQL里面我做好了用户和密码的表,请问怎么连接??谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 SQLstr="select count(*) from user where userid='"& combo1.text &"' and userpwd='"& text1.text &"'"这样写对吗? 先检索数据库,然后填充combors.open "select * from users",cn,1,3for i=0 to rs.roundcount-1combo1.additem rs("username")rs.movenextnext combo1.text="****"while rs.eof=falsembo1.additem rs.fieds(i).valuers.movenextloop 加载COMBO1里的用户名我在FROM—LOAD里就加载好了现在我只要选取一个用户名就能和我创建的表里的密码相同就行了!! 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 ifend sub VB 算学分积,求教~~~~ 在硬盘运行正常刻到光盘后失效的语句问题 VB如何实现透明图片吸附桌面 请教:如何刷新系统托盘 一个字符串进制转换问题 - 高手请进 分快用完了怎么办? 问一个VB进制转换的问题 错误处理 关于VB软件网络编程要看那些资料呀? 很简单的问题哦!!哈哈 有关文件打开对话框!! 查询问题!!! 进者有分
这样写对吗?
rs.open "select * from users",cn,1,3
for i=0 to rs.roundcount-1
combo1.additem rs("username")
rs.movenext
next
while rs.eof=false
mbo1.additem rs.fieds(i).value
rs.movenext
loop
现在我只要选取一个用户名就能和我创建的表里的密码相同就行了!!
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 ifend sub