I am using Delphi 3.0 with BDE 5.10. This error occurs only on a few
machines. One of
our clients' machines and "luckily" on our tester's machine. Our tester
is running Windows
98 on BDE 5.1.0.
I have ran SQL Monitor on my machine and her machine. I received
different results.
They are as follows:
*** Tester Machine ***
644 02:43:48 SQL Data In: SQL Server - Param = 9, Name = DURATION,
Type =
fldFLOAT, Precision = 9, Scale = 4, Data = 1.580000
645 02:43:48 SQL Data In: SQL Server - Param = 10, Name = BILLDUR,
Type =
fldFLOAT, Precision = 9, Scale = 4, Data = 1.580000
646 02:43:48 SQL Data In: SQL Server - Param = 11, Name = PAYDUR,
Type =
fldFLOAT, Precision = 9, Scale = 4, Data = 1.580000
*** My Machine ***
190 15:08:58 SQL Data In: SQL Server - Param = 9, Name = DURATION,
Type =
fldFLOAT, Precision = 9, Scale = 4, Data = 1.583300
191 15:08:58 SQL Data In: SQL Server - Param = 10, Name = BILLDUR,
Type =
fldFLOAT, Precision = 9, Scale = 4, Data = 1.583300
192 15:08:58 SQL Data In: SQL Server - Param = 11, Name = PAYDUR,
Type =
fldFLOAT, Precision = 9, Scale = 4, Data = 1.583300
Because the tester's machine is getting 1.580000 instead of 1.583300
(Actual Amount),
the error "cannot edit record because another user changed the record"
comes up when
the BDE does the count(*) from tablename where yadayadayada statement.
It tries to
seee if the record has been changed before I edit it and it thinks it
has becuase of the
rounding difference.
I have found a patch solution to this. I changed the regional setting
value of "No. of Digits
After Decimal" from 2 to 4. This seemed to work. I looked for the
ShortDateFormat
equivalent to the decimals (not the currencydigits) but did not find
one.
This error does not happen on all machines. Maybe 1 out of 150.
Since the regional settings are display options, Is there a reason the
the BDE is using the
regional settings on these computers?
Any response would be greatly appreciated.
Thanks,
Isaac Alexander
VP Software Development
Develus Systems Inc
Certified Delphi Consultant