RLock() and transaction

Xbase++ 2.0 Build 554 or later
Post Reply
Message
Author
Piotr D
Posts: 130
Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland

RLock() and transaction

#1 Post by Piotr D »

Moving an DBF-based program to PostgreSQL, is a good idea using transaction. But in existing source code
I use Rlock(). My questions are:
- if Rlock() with PgDbe make simple transaction?
- is possible "group" more updates (with RLock()) with BEGIN TRANSACTION... END TRANSACTION or is here
an conflict

For me is very important to have only one source code for DBF and SQL.

Piotr

Piotr D
Posts: 130
Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland

Re: RLock() and transaction

#2 Post by Piotr D »

Hi,
how can I made transaction when programming in "ISAM Style"? I test:

BEGIN TRANSACTION
IF RLOCK()
REPLACE ...
Unlock
ENDIF
END TRANSACTION

and

oSession:beginTransaction()
IF Rlock()
REPLACE ...
UNLOCK
ENDIF
oSession:commitTransaction() <-- return .F.

and no effects. Any idea?
Piotr

Post Reply