ADO里不能返回两个数据集~~你把Select * From ##TMP去掉就可以了

解决方案 »

  1.   

    每个sql语句后加分号,传一个长字符串试试
      

  2.   

    UNION 可以
    不过字段必须统一
      

  3.   

    没有必要弄个全局临时表出来吧select * from A t where exits ( select 1 from A where ID=t.ID)
      

  4.   

    你那三句相当于下面两句,不知你要干啥:
    Select * From A
    Select * From A
      

  5.   

    cn.Execute "Select * Into ##TMP From A;Select * From ##TMP;Select * From A Where Exists (Select * From ##TMP Where ID=A.ID  )"