How to open exclusive a table in Oracle9i like in Access, where when user1 is selecting,updating or deleting from this table, other users won't be able to select any data from this table until user1 completing his operation. Pls help....
to lock any given table, this will stop any other user from updating, inserting or deleting from that table until you either rollback or commit the transaction.
U mean I need to execute LOCK TABLE tablename IN EXCLUSIVE MODE statement first? For example, if I m using OCI in VC++ 6.0, I need to do the following?
COdb ora;
CString sql = "LOCK TABLE TABLE1 IN EXCLUSIVE MODE";
ora.exec(sql);
//This will lock TABLE1 from excessing by others ?
sql = "select * from TABLE1";
ora.Select(sql);
ora.close(); //release the lock ?
If u explain why you want to lock a table I'm sure I could be more help - I've been coding for a while and have never needed to lock a table (alright - I tell a lie - I have once)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.