0 Replies Latest reply: Dec 2, 2011 10:16 AM by jyongapoi RSS

    DynamicUpdateCommand not working initially for UPDATE

      Dear all,

       

      I have a table with two columns {Timestamp, Comment} with 1 record [1,1].

       

      I try to update the record in a macro with DynamicUpdateCommand.

      If I only run the UPDATEcommand first, nothing happens.

      When I run the INSERT command first and then the UPDATE command. Then the UPDATE command works.

       

      Does anybody know why I can't use the UPDATE command without using the INSERT command first?

       

      Here are the commands that I used:

       

      UPDATE command

      set result = ActiveDocument.DynamicUpdateCommand ("UPDATE * SET Timestamp='Hello' WHERE Comment='1'")

       

      INSERT command

      set result = ActiveDocument.DynamicUpdateCommand ("INSERT INTO * (Timestamp,Comment) VALUES (2,2)")

       

       

      Thanks!

       

      BR,

      James.