Board index » delphi » Can not edit because another user change the record

Can not edit because another user change the record

I'm using MS-SQL 7.0 and Delphi 4.0, and I'm getting the message "Can not
edit because another user change the record" everytime I try to post a
record... what's wrong with my program or Database setting ?
 

Re:Can not edit because another user change the record


Hi Sugondo,

Could it be that MS-SQL changed the record, using an autoincrement field or
a trigger?
If so, this may be your problem.

If you use TClientDataSet components, there are certain conditions that may
trigger this error. Have a look at the multi-tier or midas newsgroups for
these.

Good luck,
 Michel
 Mic...@relational-consultancy.com

Quote
Sugondo Cahyadi <im...@imeco.co.id> wrote in message

news:7sf12r$rht6@forums.borland.com...
Quote
> I'm using MS-SQL 7.0 and Delphi 4.0, and I'm getting the message "Can not
> edit because another user change the record" everytime I try to post a
> record... what's wrong with my program or Database setting ?

Re:Can not edit because another user change the record


Sugondo,

   It's a bug with the BDE when using RequestLive and float fields.  Ignore
any suggestions to run SQL monitor, or suggestions that the data somehow
changed.  Switch to CachedUpdates and watch all your problems disappear (not
to mention an increase in performance).

Good luck,
krf

Quote
Sugondo Cahyadi wrote in message <7sf12r$r...@forums.borland.com>...
>I'm using MS-SQL 7.0 and Delphi 4.0, and I'm getting the message "Can not
>edit because another user change the record" everytime I try to post a
>record... what's wrong with my program or Database setting ?

Re:Can not edit because another user change the record


Sugondo,

This is because BDE is rounding numeric fields in the where clause.

The DBE has 3 modes of construction of the Where in an update:

      0 : Table1.UpdateMode := upWhereAll; {all fields}
      1 : Table1.UpdateMode := upWhereKeyOnly; {the fields of a key}
      2 : Table1.UpdateMode := upWhereChanged; {the key and the changed
fields}

The default mode is 0, use instead mode 1 (you must have a unique key).

Best Regards,

juan.

Re:Can not edit because another user change the record


Thanks, I've checked the database on the SQL Server, but there's no
autoincrement field or a trigger. When I trace the program, the error
occured only when I post a record that contains float field(s). I haven't
try kevin's and Juan suggestion, but I'll do that may be today.... thanks
again for your suggestion.

Quote
Sugondo Cahyadi <im...@imeco.co.id> wrote in message

news:7sf12r$rht6@forums.borland.com...
Quote
> I'm using MS-SQL 7.0 and Delphi 4.0, and I'm getting the message "Can not
> edit because another user change the record" everytime I try to post a
> record... what's wrong with my program or Database setting ?

Other Threads