You are here: Surpac Concepts > Macros > SCL > Database Commands > SclIsAccessDatabaseCompatible
GEOVIA Surpac

SclIsAccessDatabaseCompatible

Overview

This command checks whether your installation of Surpac supports .mdb or .accdb Access databases. The check takes into account whether the installed version of Surpac is 32-bit or 64-bit, and whether your installed version of Microsoft Office is 32-bit or 64-bit.

Synopsis

SclIsAccessDatabaseCompatible databaseVersion

Description

With 64-bit support in both Microsoft Office and Surpac, it is faster and easier to use .accdb database files. However, the drivers used to read 32-bit and 64-bit databases are not compatible. This means there can be restrictions on the Access database format files you can use, depending on the combination of Surpac and Office you have installed.

Arguments

  • databaseVersion
  • The file extension corresponding to the type of Access database being checked - either .mdb or .accdb.

Returns

Returns true if the databaseVersion (either .mdb or .accdb) is supported; otherwise returns false.

Examples

# This example checks whether you can open .mdb and .accdb files 
# in Surpac with the user's installation.
# A message is printed to the message window stating whether you 
# can or cannot open each database file format.
# You could place this code \at the start of a script that you 
# would use when starting to use Surpac on a new computer, 
# where different versions of Surpac and Microsoft Office might be installed.                   
if {[SclIsAccessDatabaseCompatible ".mdb"]} {
	puts ".mdb supported!"                 
} else {
        puts ".mdb not supported!"
        return
}
if {[SclIsAccessDatabaseCompatible ".accdb"]} {
	puts ".accdb supported!"                 
} else {
        puts ".accdb not supported!"
        return
}