Implementing this really depends on what database you are using. (I'm not a DBA, so take everything I say with a large grain of salt.) Also, is there a particular reason you want to do this? In my (limited) experience, record-level locking makes things run a bit slower. It can be a blessing, especially if your application is multi-threaded and data is getting whacked all over the place - provided you use it on a table-by-table basis. Best, /mike
I agree to Michael. Locking is highly database dependent, and should generally not be manually done by the application. B.t.w., what type of database are you using?
Bjarki, Since it seems to apply to record level locking, could you give a brief explanation of the different uses of COMMIT with JDBC SQL? I'm just learning both and in DB2/400 record level locking is pretty much the norm. Thanks, Joel ------------------ I'm a soldier in the NetScape Wars... Joel
Wait a minute, I'm trying to think of something clever to say...<p>Joel
Most databases have different levels of locking that amount to record locking: locking to the smallest storage area that contains the record page locking: where storage is allocated to pages of data, and the page is locked. So any records in the same page are locked also Table locking. Locking all records in the same table. Depending upon what you are doing you might end up do a table lock because of the number of records selected in the where clause. Usually you want to get down to the lowest level, so other users are not impeded by your process. But at other times you may need to lock the entire table. Dan
Garry Kalra
Ranch Hand
Joined: May 25, 2001
Posts: 111
posted
0
Thank you all for replying. The database i am using is MySQL and i don't think that it supports transactions because using setAutoCommit(false) fails. I need transactions support for my website and also want to use jsp. please guide me as r there any other hosts offering jsp and database support besides webappcabaret. Also if transaction support is available in mysql, then how do i use it. Thank you all Garry
If u want it for free of cost, then better go with www.mycgiserver.com its the best I have seen. They have Hypersonic SQL and supports JSP1.1, Servlet 2.2 and JDBC1.X should support but Im not sure of JDBC2.0
[This message has been edited by Anil Vupputuri (edited June 14, 2001).]