我在使用exist方法的时候出错,报错:子程序或函数未定义
具体代码如下:
If Not Exists("select * from sysobjects where name='KUTHI'") Then
        MsgBox "WU"
    Else
        MsgBox "YOU"
End If

解决方案 »

  1.   

    If Not ("Exists select * from sysobjects where name='KUTHI'") Then
            MsgBox "WU"
        Else
            MsgBox "YOU"
    End If
      

  2.   

    呵呵,楼上的大哥一定在开玩笑吧,楼主是问一句SQL语句,你确给了一个VB的语句,晕呀,,,哈哈 哈~~~!!!!!
    If Not Exists (select * from sysobjects where name='KUTHI') 
            Begin
                  Select 'False'
            End
    Else
            Begin
                  Select 'True'
            End
      

  3.   

    谢谢各位大哥帮忙!
    我换了一个方法去做,可以了!
    好象对于exists方法是需要对象的!