Improve company productivity with a Business Account.Sign Up
*-- DbVersion.DBF contains just one record and remains still open by the app
*-- I am using DbVersion.DBF to check possible app exclusive use
*-- Failed FLUSH FORCE on DbVersion.DBF indicates network dropout
*-- If DbVersion.DBF isn't open for whatever reason
*-- simply try to open DbVersion.DBF again. If it fails data were disconnected.
LOCAL lcAlias, lcDataPath, llError, loErr AS Exception
lcAlias = SYS(2015)
lcDataPath = AppDataFolder()
FLUSH IN DBVERSION FORCE
USE (m.lcDataPath + "SYSDATA\DBVERSION") AGAIN SHARED IN 0 ALIAS (m.lcAlias)
USE IN SELECT(m.lcAlias)
CATCH TO loErr
llError = .T.
*-- Close the App if error happens
AppMessage("msgDataFolderWasDisconnected", 16, "Application Error " + TRANSFORM(loErr.ErrorNo))
DO CloseAllForms WITH , .T.
ON ERROR QUIT
Open in new window
Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.