[OpenEdge] Failure getting record lock on a record from table

dkaptein

New Member
Hello guys,

In our company we use a back-office application build in 4GL connected to our Progress 11.5 database.
We also use a PHP platform connected with ODBC to the Progress 11.5 database.

I wish to UPDATE records through the PHP platform.
I have connected to the Progress 11.5 database with a ODBC connection using the following details:
Driver: Progress Openedge 11.5 Driver
Isolation: 1 - READ COMMITTED



I use the query below to check if the record is locked and in use (exclusive-lock) by someone using the backoffice application:
SELECT tour.PUB."party-sg-attribuut".partynummer FROM tour.PUB."party-sg-attribuut" WHERE tour.PUB."party-sg-attribuut".partynummer = 374529 AND tour.PUB."party-sg-attribuut"."sg-code" = 'BBIE' AND tour.PUB."party-sg-attribuut"."sg-attribuut-type" = 'CRAIG' FOR UPDATE WITH (READPAST NOWAIT)


The SELECT returns 1 row containing the partynummer because this partynummer record: 374529, is not locked and so it is available.
Meanwhile in the backoffice application I have an EXCLUSIVE LOCK for a totally different record: partynummer 374681.
The SELECT for partynummer 374529 returned a row with a result and is valid, so the UPDATE statement is executed. This is where the error hits:

UPDATE tour.PUB."party-sg-attribuut" SET "Kenmerk-1" = 'TEST' WHERE tour.PUB."party-sg-attribuut".partynummer = 374529 AND tour.PUB."party-sg-attribuut"."sg-code" = 'BBIE' AND tour.PUB."party-sg-attribuut"."sg-attribuut-type" = 'CRAIG'

[DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Failure getting record lock on a record from table PUB.party-sg-attribuut.

Now this is something I just can not resolve.
If I start another backoffice application session while keeping the exclusive lock on the other record: 374681, I can navigate to the original partynummer record: 374529 and EXCLUSIVE LOCK this record.


UPDATE using ODBC within the PHP platform just returns Failure getting record lock on table even after testing all types of isolation levels.
So my guess is UPDATE via ODBC requires a full table lock no matter the isolation level.


EXTRA: All the UPDATE and SELECT statements are executed using transactions within the PHP platform.

I could really use some help.


Kind regards,
Dennis
 
Hello guys,

In our company we use a back-office application build in 4GL connected to our Progress 11.5 database.
We also use a PHP platform connected with ODBC to the Progress 11.5 database.

I wish to UPDATE records through the PHP platform.
I have connected to the Progress 11.5 database with a ODBC connection using the following details:
Driver: Progress Openedge 11.5 Driver
Isolation: 1 - READ COMMITTED



I use the query below to check if the record is locked and in use (exclusive-lock) by someone using the backoffice application:
SELECT tour.PUB."party-sg-attribuut".partynummer FROM tour.PUB."party-sg-attribuut" WHERE tour.PUB."party-sg-attribuut".partynummer = 374529 AND tour.PUB."party-sg-attribuut"."sg-code" = 'BBIE' AND tour.PUB."party-sg-attribuut"."sg-attribuut-type" = 'CRAIG' FOR UPDATE WITH (READPAST NOWAIT)


The SELECT returns 1 row containing the partynummer because this partynummer record: 374529, is not locked and so it is available.
Meanwhile in the backoffice application I have an EXCLUSIVE LOCK for a totally different record: partynummer 374681.
The SELECT for partynummer 374529 returned a row with a result and is valid, so the UPDATE statement is executed. This is where the error hits:

UPDATE tour.PUB."party-sg-attribuut" SET "Kenmerk-1" = 'TEST' WHERE tour.PUB."party-sg-attribuut".partynummer = 374529 AND tour.PUB."party-sg-attribuut"."sg-code" = 'BBIE' AND tour.PUB."party-sg-attribuut"."sg-attribuut-type" = 'CRAIG'

[DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Failure getting record lock on a record from table PUB.party-sg-attribuut.

Now this is something I just can not resolve.
If I start another backoffice application session while keeping the exclusive lock on the other record: 374681, I can navigate to the original partynummer record: 374529 and EXCLUSIVE LOCK this record.


UPDATE using ODBC within the PHP platform just returns Failure getting record lock on table even after testing all types of isolation levels.
So my guess is UPDATE via ODBC requires a full table lock no matter the isolation level.


EXTRA: All the UPDATE and SELECT statements are executed using transactions within the PHP platform.

I could really use some help.


Kind regards,
Dennis

what are the table index?
 
Top