We have two different application (One on oracle forms and other a web application), referring to same database.
When trying to open a record from Oracle forms 10g application, the record is getting locked in exclusive mode.
When the same record is opened from web application, both the applications hang and lock is created.
Is there a way, so that the record from forms application is opened in view only mode and exclusive lock mode is not created.
By default, a record in forms gets locked when you start editing the record (means, start typing in a field of the record).
If you see the record is already locked after the query, this is typically caused by code in the POST-QUERY-trigger of the block. If you have field-assignments in the POST-QUERY, you have to make you that there is no "cross-validation" which changes a database-field in the record and with that causes a lock for that record. So check the POST1AUERY -trigger in your form. a solution for this is to mark the record as QUERY at the end of the POSt-QUERY using SET_RECORD_PROPERTY.
Another option would be to change the Locking Mode property of your data block(s) to Delayed. This will cause Oracle Forms to only lock the record when a Commit is issued rather than when an edit (which is the default) occurs.