AnsweredAssumed Answered

vrf File Locking

Question asked by jcmartin on Jan 29, 2004
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META content="MSHTML 5.50.4934.1600" name=GENERATOR><STYLE></STYLE></HEAD><BODY bgColor=#ffffff><DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV><DIV><FONT face=Verdana color=#0000ff size=2><SPAN class=635182515-29012004>It depends on how many times and frequency you need to get the file. We have used some like this in the past, by writing file.extension.1 and file.extension.0. Before using a file by any application, the name is changed, file is read, modified, write and changed the extension.</SPAN></FONT></DIV><DIV><FONT face=Verdana color=#0000ff size=2><SPAN class=635182515-29012004></SPAN></FONT> </DIV><DIV><FONT face=Verdana color=#0000ff size=2><SPAN class=635182515-29012004>Other possible way is by means a flag by socket between applications, specifying that the file is free or busy.</SPAN></FONT></DIV><DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV><DIV><SPAN class=635182515-29012004><FONT face=Verdana color=#0000ff size=2>Regards</FONT></SPAN></DIV><BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid">  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma   size=2>-----Mensaje original-----<BR><B>De:</B> Vic Race   [mailto:vrace@hq.lindsayelec.com]<BR><B>Enviado el:</B> mircoles, 28 de enero   de 2004 19:54<BR><B>Para:</B> VRF<BR><B>Asunto:</B> [vrf] File   Locking<BR><BR></FONT></DIV>  <DIV>Hello All,</DIV>  <DIV> </DIV>  <DIV>My Vee program reads a file of comma separated values, makes some   changes, and then re-writes the file. Problem is there will be at least two   instances of this program on different computers reading and writing the same   file. I need some way of keeping one program instance locked out while another   instance is using the file.</DIV>  <DIV> </DIV>  <DIV>I noticed that if I first issue | WRITE TEXT "" EOL > in a "to   file" object the file is "locked"  until I |EXECUTE CLOSE>   with another "to file" object. </DIV>  <DIV> </DIV>  <DIV>By "locked", I mean that Excel will open the file read-only and the DOS   copy command will refuse to over-write the file.</DIV>  <DIV> </DIV>  <DIV>However, other instances of my VEE program ignore this "lock". They will   read and write to this file as they please.</DIV>  <DIV> </DIV>  <DIV>Any ideas on how I can configure my to/from file objects to respect the   file locks?</DIV>  <DIV> </DIV>  <DIV>I have found the following in the VEE help file list of error   messages:</DIV>  <DIV> </DIV>  <DIV> 720  File is in use</DIV>  <DIV> 702  Cannot open file |name>: Permission denied </DIV>  <DIV> </DIV>  <DIV>Under what circumstances are these errors raised?</DIV>  <DIV> </DIV>  <DIV>No Active-X please!</DIV>  <DIV> </DIV>  <DIV>Best Regards,</DIV>  <DIV> </DIV>  <DIV>Vic Race<BR>Lindsay Electronics<BR></DIV>---<BR>You are currently   subscribed to vrf as: jcmartin@indra.es<BR>To subscribe send a blank email to   "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to   "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list,   email "vrf@agilent.com". <BR>If you need help with the mailing list send a   message to "owner-vrf@it.lists.it.agilent.com".<BR>Send your favorite VEE   example to "VRF-EXAMPLES@agilent.com" for possible inclusion in VEE 7.0! </BLOCKQUOTE>-------------------------------------------------------------------------------------------------------------------
Este correo electrnico y, en su caso, cualquier fichero anexo al mismo, contiene informacin de carcter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda prohibida su divulgacin, copia o distribucin a terceros sin la previa autorizacin escrita de Indra. En el caso de haber recibido este correo electrnico por error, se ruega notificar inmediatamente esta circunstancia mediante reenvo a la direccin electrnica del remitente.

The information in this e-mail and in any attachments is confidential and solely for the attention and use of the named addressee(s). You are hereby notified that any dissemination, distribution or copy of this communication is prohibited without the prior written consent of Indra. If you have received this communication in error, please, notify the sender by reply e-mail---<BR>You are currently subscribed to vrf as: rsb@soco.agilent.com<BR>To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list,  email "vrf@agilent.com".  <BR>If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".<BR>Send your favorite VEE example to "VRF-EXAMPLES@agilent.com" for possible inclusion in VEE 7.0!</BODY></HTML>  

Outcomes