Anormally record locked?

alain

Member
Dear Mr Kalter
when I try to delete (by a DBNavigator)a master record wich have detail records i get an error message about the foreign key what is normal and that's why i delete all detail records in the BeforeDelete event of the master DataSet and i'm not doing explicitly a MyOraclesession.commit after the deleting.

But after several times making the same operation i got a message saying me that the record is locked by another user although i don't have this problem when i'm inserting or editing (also by a DBNavigator).
should i use explicitly the commit method of the TOracle session component and how to use in conjunction with a DBNavigator.
I mean that when a DBNavigator for example is making a delete on a TOracleDataSet
is it good to make a commit on the AfterDelete event of the TOracleDataSet wich is concerned.
Could you help me or confirm me what i'm telling you.

Thanks very much
by advance
Alain from ING Paris

------------------
 
If it says that the record is locked by another user, then there must be another session that has locked this record without committing the transaction. This can never happen as a result of actions of a single application / session, so either someone else is doing this, or you have killed an application in the middle of a transaction, and the ghost session still has some records locked.

The TOracleDataSet will implicitly commit posted records if CommitOnPost is True, so there is no need to explicitly program this.

------------------
Marco Kalter
Allround Automations
 
Back
Top