Home » Developer & Programmer » Forms » locking a table
locking a table [message #80354] Fri, 13 September 2002 01:29 Go to next message
thakur
Messages: 2
Registered: September 2002
Junior Member
hi all,
my question is how we can override the system message
"could not reserve record(2 tries),keep trying?"
when i try to access particular record twice through
two different instance of same form.

OR how can i came to know that particular record is already in use.
Re: locking a table [message #80362 is a reply to message #80354] Fri, 13 September 2002 17:11 Go to previous messageGo to next message
Susane
Messages: 27
Registered: September 2002
Junior Member
hi,

we encountered same problem before it was happend when u issued a DML statement that does not following the commit command. You can also issue a lock table statement. I send u the used of LOCK TABLE statement.
Hope it can helps u.

Description The LOCK TABLE statement lets you lock entire database tables in a specified lock mode so that you can share or deny access to tables while maintaining their integrity.
Syntax
lock_table_statement ::=
LOCK TABLE table_reference[[, table_reference]]...
IN lock_mode MODE [[NOWAIT]];
table_reference ::=
[[schema_name.]]{table_name | view_name}[[@dblink_name]]
Parameters

table_reference This identifies a table or view that must be accessible when you execute the LOCK TABLE statement.
lock_mode This parameter specifies the lock mode. It must be one of the following: ROW SHARE, ROW EXCLUSIVE, SHARE UPDATE, SHARE, SHARE ROW EXCLUSIVE, or EXCLUSIVE.
NOWAIT This optional keyword tells Oracle not to wait if the table has been locked by another user. Control is immediately returned to your program, so it can do other work before trying again to acquire the lock.
Comments If you omit the keyword NOWAIT, Oracle waits until the table is available; the wait has no set limit. Table locks are released when your transaction issues a commit or rollback.
A table lock never keeps other users from querying a table, and a query never acquires a table lock.
If your program includes SQL locking statements, make sure the Oracle users requesting locks have the privileges needed to obtain the locks. Your DBA can lock any table. Other users can lock tables they own or tables for which they have a privilege, such as SELECT, INSERT, UPDATE, or DELETE.
Re: locking a table and a row or coloum [message #81303 is a reply to message #80354] Sat, 01 February 2003 10:09 Go to previous message
satishnalla
Messages: 1
Registered: February 2003
Junior Member
1) how can we lock a row or coloum by using the procedures. give the answer with the small example
2) if we have ten tables how can we lock our related tables
3) can we create sequance for the table which was create by the user who it can be possible.
Previous Topic: Re: forms to excel
Next Topic: Re: Oracle Forms 6i 'Exit the application'.
Goto Forum:
  


Current Time: Mon Jun 17 05:16:51 CDT 2024