UNIVERSE- Begin Transaction problem

  • kartsnek
  • Topic Author
  • Visitor
  • Visitor
10 years 4 months ago #16127 by kartsnek
UNIVERSE- Begin Transaction problem was created by kartsnek
Hi,

I'm facing a technical problem while developing a program with BEGIN TRANSACTION and END TRANSACTION in universe.
I'm doing a WRITE to a universe file/hash file within the transaction boundary without locking the record/file. Please find the error message below:

The locks necessary for database operations at the current isolation
Level (0) are not held by this process.
Rolling back uncommitted transactions begun within this execution environment.

I have tried by setting the isolation levels too. But getting the same error.
Could you please help with solving this issue.

Please find the sample program :
PROGRAM TRANSACTION.SAMPLE

OPEN 'VOC' TO F.VOC ELSE STOP 'Unable to open a VOC file'
BEGIN TRANSACTION ISOLATION LEVEL 0
WRITE 'TESTING' TO F.VOC,'TEST' ELSE STOP 'unable to write record'
COMMIT
END TRANSACTION
RETURN
END

Please Log in or Create an account to join the conversation.

More
10 years 4 months ago - 10 years 4 months ago #16129 by jpb
Replied by jpb on topic UNIVERSE- Begin Transaction problem
Have you checked STATUS() after the WRITE ?

STATUS Function Values After MATWRITE, WRITE, WRITEU, WRITEV, or WRITEVU
Value Description
0 The record was locked before the operation.
3 In NLS mode, the unmappable character is in the record ID.
4 In NLS mode, the unmappable character is in the record’s data.
−2 The record was unlocked before the operation.
−3 The record failed an SQL integrity check.
−4 The record failed a trigger program.
–6 Failed to write to a published file while the subsystem was shut down.


What if you use WRITEU instead of WRITE ?
What if you use LEVEL 1 (same as 0 but not hooked to ISOMODE)?
Last edit: 10 years 4 months ago by jpb. Reason: missed LEVEL 0

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds