您的位置:程序门 -> vb -> 数据库(包含打印,安装,报表)



请赐教如何使用adodc的find方法?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


请赐教如何使用adodc的find方法?[已结贴,结贴人:myrenhe]
发表于:2007-04-06 08:43:35 楼主
程序如下,请将?部分写成具体的源代码:
with   adodc1
                        .connectionstring   =   "dsn=jczx "
                        .recordsource   =   "select   *   from   学号 "
                        .refresh
end   with
'text1用来接受学号
if   adodc1.recordset.find   (学号=text1.text,?,?,?   )=?   then
        msgbox   "此学号已存在,请重新输入 "
end   if
先谢谢各位了!
发表于:2007-04-06 09:09:541楼 得分:2
adodc1.recordset.find   "学号=text1.text "
if   not   adodc1.recordset.eof   then
msgbox     "此学号已存在,请重新输入 "
end   if
发表于:2007-04-06 09:17:512楼 得分:0
谢谢xiaolei1982的提示.
修改之后提示:缺少函数或变量
哪位大侠有更好的办法?
发表于:2007-04-06 09:29:403楼 得分:0
缺少什么函数?
发表于:2007-04-06 09:30:304楼 得分:8
adodc1.recordset.find   "学号= "   &   " ' "   &   rtrim(me.text1.text)   &   " ' "
if   not   adodc1.recordset.eof   then
msgbox     "此学号已存在,请重新输入 "
end   if
发表于:2007-04-06 09:35:225楼 得分:0
多谢了.
解决了.
给你分


快速检索

最新资讯
热门点击