File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes problem related to locking the table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Reply locked New topic

problem related to locking the table

NagarajGoud uppala
Ranch Hand

Joined: Nov 13, 2008
Posts: 86

i am facing a problem while applying locks on the oracle intention is stop the accessing of table to other users, if the table is locked by one user.

for this i wrote the code as follows

after locking i inserted some data into table, after insertion i am not commiting it because if i commit,the lock will be i am trying to insert data into that table from another system,actually the data don't insert.but data is inserted. how it is happening like that ??

in another scenario, if execute the locking query on the database directly then trying to insert into database through java application, at that time it is not giving permission to access table(in this case evrything is fine).

please guide me


I know Life is very Tough...But I AM TOUGHER
SCJP 1.5
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074

This question does not have anything to do with SCJP - JDBC and databases are not part of the SCJP exam.

I will move this question to a more appropriate forum. Please carefully choose a forum next time when you post a question.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074

Oh, it's a double post. Closing this one.
It is sorta covered in the JavaRanch Style Guide.
subject: problem related to locking the table
Similar Threads
problem related to locking the table
how to convert .csv files into sql server files using java
Values inserted but not showing up in MS Access table
JDBC Error--> [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1
JDBC Connection