Board index » delphi » Another user edited the record!

Another user edited the record!

Hello,

How can it be that if only one user uses a database in one program it
receives the error 'another user already edited the record you try to
update' when trying to post a record?

I am using MSSQL 7 and MSSQL native drivers.

 

Re:Another user edited the record!


Hello,

How can it be that if only one user uses a database in one program it
receives the error 'another user already edited the record you try to
update' when trying to post a record?

I am using MSSQL 7 and MSSQL native drivers.

Re:Another user edited the record!


This behavior is most commonly associated with floating point or DateTime
data.

The problem is in the diference in precision between SQL Server and Delphi.

The solution is to round off the millisecond part of the data ie:

{ in the onBeforePost method of the dataset do this conversion... }
myDateTime.AsString := formatDateTime('dd/mm/yyyy',myDateTime.AsDateTime);

=Bill

Other Threads