check the read only attribute when you open the file, if it is not set set it and open the file. If it is set, keep trying, or throw an error. When you are done turn it off.
Matt testblokepuma wrote: >I many label programs that all increment a counter on a server (simple >text file) for the serial number part of the label. Problem is that >two different PC's are managing to open the file at the same time, >therefore I am getting duplicate serial numbers (big issue with customer). >How can I get this counter file to restrict access to one user at a time. >Help much appreciated. > >Kevin > > > > > > > >'// ======================================================= > Rules : http://ReliableAnswers.com/List/Rules.asp > Home : http://groups.yahoo.com/group/vbHelp/ > ======================================================= > Post : [email protected] > Join : [EMAIL PROTECTED] > Leave : [EMAIL PROTECTED] >'// ======================================================= > >Yahoo! Groups Links > > > > > > > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/k7folB/TM --------------------------------------------------------------------~-> '// ======================================================= Rules : http://ReliableAnswers.com/List/Rules.asp Home : http://groups.yahoo.com/group/vbHelp/ ======================================================= Post : [email protected] Join : [EMAIL PROTECTED] Leave : [EMAIL PROTECTED] '// ======================================================= Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/vbhelp/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
