I have a foxpro billing system, which is updating MS SQL database remotely. Following is a one of SQL INSERT I use when saving the billing;
chkTrn=SQLEXEC(ln,"INSERT INTO trnnumber (serial, _user, dt, module, remark, idn) VALUES ((SELECT ISNULL(MAX(serial)+1,1) FROM trnnumber),?muser, ?mdtUpdate, 'invoice', '', ?midn)")
Then check chkTrn value to make sure where the insert function worked or not. If chkTrn is less than 0, there will be loop function which will keeps on try till the connection back to normal.
My only worry is; will there be any partial update being done during the insertion process, due to loss of the connection. if so how to check it?
Thanks in advance.
chkTrn=SQLEXEC(ln,"INSERT INTO trnnumber (serial, _user, dt, module, remark, idn) VALUES ((SELECT ISNULL(MAX(serial)+1,1) FROM trnnumber),?muser, ?mdtUpdate, 'invoice', '', ?midn)")
Then check chkTrn value to make sure where the insert function worked or not. If chkTrn is less than 0, there will be loop function which will keeps on try till the connection back to normal.
My only worry is; will there be any partial update being done during the insertion process, due to loss of the connection. if so how to check it?
Thanks in advance.