is output running on file?, keep file locked ?

Mike Fedko filepro at adelphia.net
Fri Apr 15 17:51:17 PDT 2005


windows 2000 advanced server
filepro 5.0.09


I have a visual basic ordering program that my customers use. The order prog has a transmit button that FTP's an order.txt file to an orders dir on my website. On my end, I have another FPT program that downloads the order.txt file to a folder called orders on my computer. I am using filepro with sleep to scan the orders dir every few seconds. If a file called "order.txt" exists, I import it into Filepro, generate an invoice, print a pick sheet, and send a confirmation back to the website. The visual basic order program will get the response if all works well.

I want to make this process bulletproof, if at all possible. The biggest problem I see is, what if someone in my office is printing at the same time this automated process tries to print. The automated process is going to sit there saying "filepro error occurred, request output running on file, etc..."

What I would really like to do is, as soon as I see the file in the orders dir, check if output file is locked. If it is not locked, then lock it. NOW import file in, generate invoice, unlock and print pick sheet, respond back successful.  

I guess the whole point is to avoid hitting the "filepro error occurred, request output running on file" I don't know the best way to do it. Has anyone done similar stuff.

Any help will be greatly appreciated

Thank You, 
Mike Fedko

  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.celestial.com/pipermail/filepro-list/attachments/20050415/3ca576de/attachment-0001.html


More information about the Filepro-list mailing list