Hi all, i am new to jdbc as well as servlets. i am using MS SQL Server as my db and drivers provided by "JRun " in one of my servlet.my servlet may be accessed by more than one user at the same time. they may try to write to different records of the same table. i was told that to avoid conflict between the two statements, we have to set up buffering to either optimistic or pesimistic while getting the resultset. i have no idea what that means or how to set it up. any help in this regard will be greatly appreciated. my system info JRun3.1/IIS 4.0/NT 4.0/MS SQL Server Subbu
You need to set up a connection pool. A connection pool will allow for multiple simultaneous users to access your db. This will also reduce the overhead because it recycles connections rather than create new connections for every new user. Look at the CoonectionPool class to get started.
Joined: Jun 22, 2001
Hi Jeff, I think i didn't word my question correctly.i will explain it once again. my problem is not connection pooling.as a matter of fact i am using connection pooling.my question is, what if two users try to update two different records of the same table.will the table get locked or just the record.someone mentioned to me that we can control if the entire table gets locked or just the record being updated. i want to know how can this be done using java. thanks for ur reply. Subbu