+ Reply to Thread
Results 1 to 3 of 3

Thread: File Lock in ASP

  1. #1
    bnq
    Guest

    File Lock in ASP

    Hi All,



    Is there any way to get a file lock in ASP so that no one else can write to file at that particular time and when I call releaseLock, the lock will be released?



    I would appreciate any help in this regard. Thanks in advance!!







    Best Regards,

    Inderpal Singh
    More Information:
    1. Could somebody tell me how to lock access to a file that is downloading? I have a program that reads info from that file and it will produce partial data if it arrives at a file that is in the process of loading
    2. The easiest way to lock Windows XP is by simply pressing the Windows logo key and the letter L (for Lock) on a Microsoft Natural Keyboard or any other
    3. a text file that it attaches to its merchant notification
    4. com > :: Server side development > ASP > File Locking?
    5. The wizard also allows you to quickly pick the image path of a process (Select > File from Process) or a program that runs at startup from the Registry
    6. bmp file used to construct the Bitmap object remains locked afternot onlyafter exiting Page_Load, but also after the page has
    7. Is there an easy way to make a request wait untill the file can
    8. Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access 97 Driver] Couldn't lock file
    9. Simple file sharing is turned off on my machine, so that isn't the issue
    10. I have a filewatcher running on a directory and I

    More:


  2. #2
    vietlinhtalk
    Guest

    Sure. Use an application variable.




    Code:

    if Application("FILELOCKED")<>"true" then
    Application("FILELOCKED")="true"
    'do stuff with the file
    Application("FILELOCKED")="false"
    end if

    To make it wait for the lock, instead of IF...THEN, use DO...LOOP.

    If you're going to have a lot of connections to your site, you need to make sure two people don't execute the filelock check at the same time, because both would show it was unlocked then both would try to lock it. To do that, you'll have to use Application.Lock.
    More Information:
    1. Instantly locks or hides any file using a password with a click
    2. That's all fine until one needs to write to the file which could get shot down while the lock is still active
    3. There musn´t be concurrent accesses to the file to prevent write problems
    4. Developers should not consider mandatory file locking as a security feature
    5. Once a file is locked, or hidden, it cannot be read or used by anyone until it is unlocked or shown
    6. Kill sFileName End If iFileHandle = FileLock(sFileName, eOpenUpdate, Len(tUser)) 'Open the file and lock it 'Add 10 users (all called Red!)
    7. This shareware allows you to encrypt/lock, decrypt/unlock files and folders, based on your needs
    8. 4 posts - 2 authors - Last post: Aug 29, 2003File Locking Issues - Microsoft Windows 2000 Setup

+ Reply to Thread

Similar Threads

  1. PCI lock - always good?
    Archived from groups: alt.comp.hardware.overclocking.amd ()PCI lock is getting a lot of attention here the last couple of weeks. I'd like to know...
  2. BF6 - Ram slot lock
    Archived from groups: alt.comp.periphs.mainboard.abit ()Hi, i've got a pb why my BF6 mother board. One of my ram slot has got a pb and the boot...
  3. Usb file transfer lock up
    Yesterday i transfer some files in my pc through USB after that when i clicked on safely remove USB didn't stop after some time my pc hang remove the...
  4. Multiplier lock
    What happens when you change your multiplier jumper without unlocking it? Does it fail to boot or does it not matter? TBird 800 - Asus A7V 1005a...
  5. can`t lock PCI-E Frequency
    hey , i have some problems with my overclocking. first my system : Intel Core™2 Duo E6300 GigaByte 945P-S3 s775 PQI 1024MB TURBO CL4 OCZ...

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Automatic Translations (Powered by Powered by Google):
Afrikaans Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Taiwanese Thai Turkish Ukrainian Vietnamese Welsh Yiddish