pele贝利读音:数据库中表的一格对应text文本数据输出

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/02 19:43:26
就是信息管理系统登陆后,只显示自己的信息到对应text文本,,偶太菜了,但作业必须交啊,,各位大哥大姐帮帮偶啊!!! 小弟谢了啊!!!!

利用记录集把数据库里各个字段的内容读出来,然后分别赋给不同的TEXT
sql="select 子段1,子段2,,子段n from biao"
rst.open sql,cnn,adopenkeyset,adLockReadOnly, adCmdText
if not rst.eof then
text1.text=rst.fileds("子段1")
text2.text=rst.fileds("子段2")
...
textn.text=rst.fileds("子段n")

end if
rst.close
rst=nothing

rst为记录集,cnn为数据库连接