N
NK
(this has been asked once by some one else before but no answers)
My goal:
To have a feature which
1. Lets user query the DB for an order
2. Load the orders data onto the form
3. Make changes to the form
4. BUT, now instead of submitting to the same row I would like the
current data be inserted as a new row. (i.e., trigger an INSERT into
the database rather than an UPDATE of the original orderrecord).
The reason is for statistcal purpose, we want to track changes. (in
other words enable versioning)
Is it possible, any tips...
For simplicity, my situation: Orders table has 3 columns
OrderID (unique order Id, not necessarily autoincrement)
VersionID (autoincrement for that particular OrderID)
Description (some order description)
Sample data would be
ORD1, 0, 'Ordered pizza'
ORD1, 1, 'Ordered burger'
ORD1, 2, 'Ordered sandwich'
ORD2, 0, 'Ordered tequila'
ORD2, 1, 'Ordered tequila and nachos'
So whats happening is ORD1 has version 0,1,2 and I am able to see what
were the versions.
First CUT - have rules to submit the data.
Rule 1 - Submit the data
Rule 2 - Clear the VersionID field and again submit the data
BUT Rule 2 is not creating another row, it is just updating the current
row.
Any suggestions..
Thanks,
NK
My goal:
To have a feature which
1. Lets user query the DB for an order
2. Load the orders data onto the form
3. Make changes to the form
4. BUT, now instead of submitting to the same row I would like the
current data be inserted as a new row. (i.e., trigger an INSERT into
the database rather than an UPDATE of the original orderrecord).
The reason is for statistcal purpose, we want to track changes. (in
other words enable versioning)
Is it possible, any tips...
For simplicity, my situation: Orders table has 3 columns
OrderID (unique order Id, not necessarily autoincrement)
VersionID (autoincrement for that particular OrderID)
Description (some order description)
Sample data would be
ORD1, 0, 'Ordered pizza'
ORD1, 1, 'Ordered burger'
ORD1, 2, 'Ordered sandwich'
ORD2, 0, 'Ordered tequila'
ORD2, 1, 'Ordered tequila and nachos'
So whats happening is ORD1 has version 0,1,2 and I am able to see what
were the versions.
First CUT - have rules to submit the data.
Rule 1 - Submit the data
Rule 2 - Clear the VersionID field and again submit the data
BUT Rule 2 is not creating another row, it is just updating the current
row.
Any suggestions..
Thanks,
NK