Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query Locks Table in SQL Server 2000!!

843854Jul 1 2004 — edited Jul 1 2004

Hi all!

I am facing a strange problem. I am using MS SQL Server 2000.

I have a JDBC program.It executes a query on a table (STUDENT) and fetches some record from it.

The query gets executed fine for the first time but when the SELECT query is executed on the same table (i.e. STUDENT) from some other block of code within the same program the program hangs at the location where resultset is pointed to the first record i.e. RS.next();

When I try to execute the SELECT query on the same table (i.e. STUDENT) from a query tool when the program is running it also gets hanged!!!

It seems that after running the query for the first time on the STUDENT table from the next time its getting hanged....i believe the Table gets locked for some reason!!

Is that normal with SQL Server 2000.....The same code works fine with other database!

Please suggest...wht has to b done to gt it fixed!

Thankz a loadz bforehand!

Arun
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 29 2004
Added on Jul 1 2004
4 comments
90 views