Re: Problems with locks and committed read
Posted in 2004
You say the problem only occurs in MODE ANSI databases? this may suggest you don't have any commit or rollback statements. In a non mod ansi daatebse without begn and commit, every sql statement would be treated as a single transaction and would be so the lock would be released immediately after the insert statement completed. but not in mode ansi. mode ansi you are always in a transaction and have to expicily issue a commit or a rollback to free the locks. If this is not the problem... what do you want to happen if a row is locked? You don't want to read the phantom row, but you don't want the app stop when it encounters the lock? Are these short transactions? If so, how about "set lock mode to wait". the select will then wait till the lock is released (which should occur when you run the commit work or rollback work statements). "hobbes" <pasdespam@yahoo.fr> wrote in message news:<40bcd8c4$0$7700$636a15ce@news.free.fr>... > Hi ! > > > well, once again... > another question on locks, and isolation level. > > This time it's rather "critical" for me. > > > I've got 2 processes. > > One of them => insert data in some tables. > The second => try to select row in it. (in fat , it select in it) > > > the two transactions are initialized with => committed read, and lock mode > to wait.and tables have row lock level. > > Everything works fine for insert, except that when i'm trying to read data > with the second transactions .... it locks. > In an ANSI DATABASE > > Dirty read will be a solution but i can't have phantom with this case .(data > inserted are not "obligatorily" used so then can be removed before data > selected is used in another transaction.) > > Well, this has been discussed often... > But i still try my luck on this one .... > > > Any idea ? > I will studies any possibilites :) > Change database mode, add query where needed. > (is there a way with dirty read ON to see if a record is locked ??) > > By advance Thx ! > > Arnaud > > > > > > if you want to answer private: > pubas 'A T' netcourrier com