File Locking
-
Hi everyone, I need to know how I can lock a file if someone else is using it. Briefly, I have an application which allows users to view pieces of mpg (each has a unique ID) and attach relevant data to it - a translation if needed, brand/product info etc - and then saves the whole item (mpg + metadata) to a database including the path to the now-archived mpg. The mpgs are played by clicking the appropriate row in a datagrid control which launches the mpg in a form with a media player control embedded into it. The thing is, I need to be able to somehow lock an mpg so that if user A is busy with it then user B can not begin work on it at the same time. All of the mpgs are stored on a central holding server which may have up to 20 people connected to it at any one time. When a user goes to enter the mpg information, the initial media player window closes and transfers them to a data entry screen. This holds the unique name in view but its only existent on the form at this point, not on a database. Can this be done? Sorry if I waffled, just wanted to give as much info as possible. Cheers everyone Scott
-
Hi everyone, I need to know how I can lock a file if someone else is using it. Briefly, I have an application which allows users to view pieces of mpg (each has a unique ID) and attach relevant data to it - a translation if needed, brand/product info etc - and then saves the whole item (mpg + metadata) to a database including the path to the now-archived mpg. The mpgs are played by clicking the appropriate row in a datagrid control which launches the mpg in a form with a media player control embedded into it. The thing is, I need to be able to somehow lock an mpg so that if user A is busy with it then user B can not begin work on it at the same time. All of the mpgs are stored on a central holding server which may have up to 20 people connected to it at any one time. When a user goes to enter the mpg information, the initial media player window closes and transfers them to a data entry screen. This holds the unique name in view but its only existent on the form at this point, not on a database. Can this be done? Sorry if I waffled, just wanted to give as much info as possible. Cheers everyone Scott
One thing you could do is put a flag in the DB to indicate that an MPG is in use and prevent other users from modifying it. This should if you can modify the database schema (like adding a column to a table).
----- If atheism is a religion, then not collecting stamps is a hobby. -- Unknown
-
One thing you could do is put a flag in the DB to indicate that an MPG is in use and prevent other users from modifying it. This should if you can modify the database schema (like adding a column to a table).
----- If atheism is a religion, then not collecting stamps is a hobby. -- Unknown
Hi Le Centriste, Thanks very much for the suggestion but the way the DBA here controls his database borders on the psychotic. By the time he considers the request and then (if?) actually actions it, I'd hope to be able to achieve the same thing programatically... Any more ideas anyone? Scotty
-
Hi Le Centriste, Thanks very much for the suggestion but the way the DBA here controls his database borders on the psychotic. By the time he considers the request and then (if?) actually actions it, I'd hope to be able to achieve the same thing programatically... Any more ideas anyone? Scotty
save it to XML or in a new table in data base With reference of the file and a flag of file usage check it every time user tries to access the file (and don't forget to cleanup after user finished working )
Regards Amar Chaudhary