Print Thread
record changed by another user
#2153 06/21/01 05:21 PM
Joined: Jun 2001
Posts: 8
Berlin, Germany
R
rb1234 Offline OP
Member
OP Offline
Member
R
Joined: Jun 2001
Posts: 8
Berlin, Germany
i use doa, delphi 5 with midas.

i do a lot of the following:

ds.datarequest('select bez from table where nr = 1');
ds.fieldbyname('bez').value := 'new';
ds.apply_updates;
(bez is a memo field)

mostly it works fine, but sometimes, with some records, i get the error 'record changed by another user'.

there is definitely no other user who changed anything. the records where the aplyupdates failed seem not different from others, i can't see any special.

i played around with oracledataset.lockingmode and oracledataset.refreshoptions. nothing helped.

i can't understand what happens there, why it sometimes work and sometimes not.
what could be a reason for this error message?

ralf

Re: record changed by another user
#2154 06/22/01 01:15 PM
Joined: Jun 2001
Posts: 8
Berlin, Germany
R
rb1234 Offline OP
Member
OP Offline
Member
R
Joined: Jun 2001
Posts: 8
Berlin, Germany
it seems to occur by chance.

i use a midas server with doa but i still have my old bde midas server.

in my app i read records from a text file to oracle tables. each file has about 1000 records. i do a datarequest for each record, change some fields and then do an apply.
every some thousend apply's i get the 'record changed by another user' error. i don't hav any idea what the course of the error could be. in my test environment there is no other user and mostly it works.
i overcome this with using my bde server for the file where the error occure, after this use my doa server again.

so doa seems just a bit 'unstable' for me. with the bde server i never get this error (i get other errors and that's why i want to move to doa).

any idea?

regards,
ralf

Re: record changed by another user
#2155 06/22/01 02:54 PM
Joined: Aug 1999
Posts: 22,219
Member
Offline
Member
Joined: Aug 1999
Posts: 22,219
This can only happen if the record in the database is different from the record in the result set of the dataset. If you are sure that nothing has changed in the database, then maybe the select statement uses a function on one or more select list items? You could for example have used an Upper function on a column, and use the original column name for the alias:

select deptno, upper(dname) dname, loc from dept

If the value of a dname column is not all uppercase, the dataset would think that this column has been changed by another user.

These are the only 2 things I can think of: the record is in fact changed in the database since it was fetched, or the select statement modifies the column values.


------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.129s Queries: 13 (0.095s) Memory: 2.5023 MB (Peak: 3.0394 MB) Data Comp: Off Server Time: 2024-05-16 07:37:30 UTC
Valid HTML 5 and Valid CSS