Set rs = DE.Commands("getrs").Execute 的结果及永远是只读的
可以用rs.open "sp-a @p1=1,@p2,......",conn,3,3

解决方案 »

  1.   

    Command 对象的指针是只读的,所以在Rs接收的时候得到的也是只读的结果集
      

  2.   

    to :Set rs = DE.Commands("getrs").Execute 的结果及永远是只读的“?
    好奇怪啊,这样就不能用了吗?
    如果这样的话,在command中不是可以设置recrodset的属性吗?这??。。
    怎么回是
      

  3.   

    存储过程返回的数据是只读的.如果你要打开表进行修改的话,用recordset对象来打开表(不能是存储过程).就可以修改数据了.
    Set rs = New ADODB.Recordset
    rs.CursorType = adOpenKeyset
    rs.LockType = adLockOptimistic
    rs.open "getrs",databaseconnection,adOpenKeyset,adLockOptimistic
    Set dg(0).DataSource = rs
    dg(0).Refresh