我通过select语句查询:
select xm
from stud
where xh = '980231';
想检查一下检索出来的xm是否正确,使用msgbox来显示一下xm是什么,就和pb中一样!怎么用啊?

解决方案 »

  1.   

    rs.open "select xm from stud where xh='980231'",conn,adopenkeyset,adlockreadonly
    if rs.recordcount>0 then
        msgbox rs!xm &""
    end if
    set rs=nothing
      

  2.   

    我定义了rs 为dim rs as recordset
    可是怎么报错method or data member not found!!!就是没有找到open方法!
      

  3.   

    引用ADO
    dim rs as ADODB.recordset
    set rs = new ADODB.recordset或者
    dim rs as new ADODB.recordset
      

  4.   

    引用ADO
    dim rs as ADODB.recordset
    set rs = new ADODB.recordset或
    dim rs as new ADODB.recordset
      

  5.   

    data1.recordsource="select........"
    data1.refresh