I have a page that runs an append from Original database to New database, then deletes the originals from Original database. The coding works, I just am concerned about a possible error resulting in lost data later.
The code works and does what it should. Will it always execute properly? First running the append then deleting the original data. Is there a way to force one set of coding to run before the next? I am just concerned that one day it may run delete before the append.
I realize that the safest way is to set this up on separate pages, but that makes it inconvenient and also gives the ability to start loosing or double copying data because of human mistakes.
Any suggestions?
Also thank you to all of those that has suggested or helped in the past with my many many questions. You guys are great
Code:
DIM Append as P a_tbl = table.open("[pathalias.adb_path]\scc_inventory_sold") append.t_db = "[pathalias.adb_path]\scc_inventory" append.m_key = "" append.t_key = "" append.m_filter = "" append.t_filter = "alltrim(Location) = \"Sold\"" append.type = "All" append.m_count = 8 append.m_field1 = "Id" append.m_exp1 = "@Scc_Inventory->Id" append.m_field2 = "Serialnumber" append.m_exp2 = "@Scc_Inventory->Serialnumber" append.m_field3 = "Stockcode" append.m_exp3 = "@Scc_Inventory->Stockcode" append.m_field4 = "Location" append.m_exp4 = "@Scc_Inventory->Location" append.m_field5 = "Description" append.m_exp5 = "@Scc_Inventory->Description" append.m_field6 = "Condition" append.m_exp6 = "@Scc_Inventory->Condition" append.m_field7 = "Notes" append.m_exp7 = "@Scc_Inventory->Notes" append.m_field8 = "Accessories" append.m_exp8 = "@Scc_Inventory->Accessories" append.t_count = 0 a_tbl.append() a_tbl.close() a_tbl2 = table.open("[pathalias.adb_path]\scc_inventory") a_tbl2.delete_range("alltrim(Location) = \"Sold\"") a_tbl2.close()
I realize that the safest way is to set this up on separate pages, but that makes it inconvenient and also gives the ability to start loosing or double copying data because of human mistakes.
Any suggestions?
Also thank you to all of those that has suggested or helped in the past with my many many questions. You guys are great
Comment