Hi all has anyone any info about the dbused function? I have checked out the basic info on my help menu but what I would like to know if I can use the dbused function to check if the database within my application is used by another networked user of their application.
Im am using the following code within the start program of my application, I do a check to see if I can get exclusive use of the table delivery_details, if I can I then pack the file to remove all deleted records, as so many users create and delete delivery notes I want to pack the file where possible when no other users are using the application.
The code I am using is as follows:
if !dbused('poem')
open database poem excl
use delivery_details excl in 0
pack
close databases all
endif
This code works fine if I can get exclusive use of the delivery_details table when only one user is using the system. What happens when a second user opens there application is I get the message 'File access is denied'
if the user is to press ignore the user can enter the system and view the shared data as normal.
What I suspect is that the line "if !dbused('poem')" is being carried out though another user is using the dbase 'poem' and that it only checks if the current system being run has the poem database open. Does anyone know if my suspicions are right or if Iam just going about this wrong.
Trying not to lose faith
Cheers, Michelle
Im am using the following code within the start program of my application, I do a check to see if I can get exclusive use of the table delivery_details, if I can I then pack the file to remove all deleted records, as so many users create and delete delivery notes I want to pack the file where possible when no other users are using the application.
The code I am using is as follows:
if !dbused('poem')
open database poem excl
use delivery_details excl in 0
pack
close databases all
endif
This code works fine if I can get exclusive use of the delivery_details table when only one user is using the system. What happens when a second user opens there application is I get the message 'File access is denied'
if the user is to press ignore the user can enter the system and view the shared data as normal.
What I suspect is that the line "if !dbused('poem')" is being carried out though another user is using the dbase 'poem' and that it only checks if the current system being run has the poem database open. Does anyone know if my suspicions are right or if Iam just going about this wrong.
Trying not to lose faith
Cheers, Michelle