如果改用conn.execute "insert into ......"却行,这到底是为什么?

解决方案 »

  1.   

    你的问题解决了吗!!请你告诉我
    [email protected]
    csdnhelp
      

  2.   

    有些SQL文生成的记录集是不允许更新或增加记录的,如:
      Select * From ta,tb Where ta.code=tb.code And tb.Sex='M'你不妨贴出你的SQL文来看看。
      

  3.   

    同意moyaxu(星) 
    rs.open strsql,strconn,1,3
      

  4.   

    这是我写的用rdo连的,希望对你有帮助
    strsql = "select * from data_tab where zdate=" & "'" & Trim(Text1.Text) & "'" & " order by codenum"
    Set rst = cn.OpenResultset(strsql, rdOpenKeyset, rdConcurValues)
       Do While Not rst.EOF
         With mainview
         .AddNew
         !code = rst!codenum
         !wangno = rst!wangno
         !data = intw(rst!codenum, Trim(rst!statdata))
         !Date = Trim(Text1.Text)
         .Update
         End With
        rst.MoveNext
    Loop