Hello Sean,
Dynamic Views will handle only the Delete by using an "Action". The query for the action would be very similar to the query you provided in your post, except with a minor tweak:
Delete from MyTestTable Where ID='$(PrimakeyKey)'
The PrimaryKey token is derived from the Column that you've specified as the Primary Key in the Dynamic View.
The Add and Edit workflow can be handled by a Dynamic Form. You can build one SQL Form Completion Event to INSERT and another to handle UPDATE.
You can build Dynamic Hyperlinks from the Dynamic View that point to the Dynamic Form thus letting the Dynamic Form know which mode it is in.
You could have a simple hidden field on your Dynamic Form that could be named "DBUpdate" and has a default value of "False", this field will also retrieve from Querystring variable.
So if you pass ?DBUpdate=True through the URL then this could be a way to let the Dynamic Form know that you're Updating an existing record. The Insert SQL will only conditionally fire if DBUpdate = False. The Update SQL will only conditionally fire if DBUpdate = True.
Please note that DBUpdate isn't a keyword, you can name this trigger field anything you want. Since this is an advanced workflow that isn't covered by our Standard Support I won't be able to elaborate much more.
I'm certain that you'll find some techniques that you can use from our Free Demonstrations:
http://www.datasprings.com/formdemos Please let me know if you have any questions.
Thanks,
Ryan