我想查一个表中是否一个记录,如果有可否得到一个真假值呀.

解决方案 »

  1.   

    txtsql="select * from 表"
    set rs=executesql(txtsql,msgtext)
    if rs.eof=true then
     msgbox "没有记录"
    else
     msgbox "有记录"
    end if
      

  2.   

    天上之王 'executesql'是自己做的一个函数吗?
      

  3.   

    rs.open "select * from table ",conn,3,1
    if rs.eof=true then
     msgbox "没有记录"
    else
     msgbox "有记录"
    end if
      

  4.   

    dim bl as boolean
    rs.open "select * from table ",conn,3,1
    if rs.eof=true then
     bl=false
    else
     bl=true
    end if