Re: Multi user access to table data...
Posted in 1999
I haven't worked much with VB, so I'm not sure if that will make any difference to my answer...... If you want users to have no access at all to a record that is being accessed by another user, then use declare cursor for select ..... FOR UPDATE to lock the record that is being accessed. (SE only, otherwise works similar to the second option) or if you are only concerned with a record being updated while another user is reading it and therefore the user who is reading will have the wrong information, you can use SET ISOLATION TO CURSOR STABILITY or to REPEATABLE READ. This will prevent the record being updated while another user is reading it. RTFM for a full explanation of all this. Hope this helps Sue krishnakn@yahoo.com on 18/08/99 08:48:06 Please respond to krishnakn@yahoo.com To: informix-list@iiug.org cc: (bcc: Sue Davidson/EXE) Subject: Multi user access to table data... Hi, Mulitiple user access data from a table(t_acctno). [The Front end is VB]. Lets assume that the table "t_acctno" contains information about accout numbers(unique). The requirement is not to allow more than one user to access a particular account at the same time. Different approaches thought by me to solve the problem : 1. To have a flag in the table(t_acctno) and update when a user accesses it and reset the flag when he is done... But, if FE application disconnects abruptly the flag will not be reset ... 2. To read the last modified datetime along with acctno information and check the retrieved datetime value before modifying the data. But, the user will be given an error msg and he would have to reload the data again and start modifying it again.... Is there any other way of doing the above ??????? I need a solution urgently ........ Pl. help me out ... Thanks krishnakumar Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.