This function checks the presence/status of a specified database file, denoted by an integer output. Specification of a file extension is optional, and if omitted, the function will check for either one of motion (DBM) or force (DBF) database files.
IsValidDatabase (string DatabaseName)
DatabaseName (string). The full path name to the relevant database.
0 (if the database is valid)
1 (if the database files are present but either has changed)
-1 (if the force database is missing)
-2 (if the motion database is missing)
-9999970 (if the path or filename contains invalid characters)
-9999980 (if the database filename is empty)
-9999998.0 (if the both the force database and motion database are missing)