IMPORT ACCESS command

Used to define ACL tables from Microsoft Access database files.

Syntax

IMPORT ACCESS TO table <PASSWORD num> import_filename
FROM source_filename TABLE input_tablename CHARMAX max_field_length
MEMOMAX max_field_length

Parameters

TO table

Specifies the name of the ACL table to import the data into.

PASSWORD num

Optional. Specifies the password for password-protected Access files.The num parameter corresponds to the number of the password definition to use. For example, if you have defined two passwords in your script, PASSWORD 2 specifies that the second one should be used. If you do not define the password value in your script, a password prompt will be displayed when the script is run.

import_filename

Specifies the name of the ACL data file. The import_filename parameter must be specified as a quoted string with a .FIL file extension (e.g., "Invoices.FIL").

If you do not want to create the .FIL file in the same directory as the ACL project, you can specify an absolute or relative file path to an existing folder to write the .FIL file to.

For example: "C:\data\Invoices.FIL" or "data\Invoices.FIL"

FROM source_filename

Specifies the name of the source data file. This parameter must be specified as a quoted string.

If the source data file is not located in the same directory as the ACL project, you must use an absolute path (e.g., "C:\data\source_filename") or a relative path (e.g., "data\source_filename") to specify the file location.

TABLE input_tablename

Specifies the name of the table in the Microsoft Access database file to import.

CHARMAX max_field_length

Specifies the maximum length for any field in the ACL table that originates as character data in the source data file.

MEMOMAX max_field_length

Specifies the maximum length for any field in the ACL table that originates as memo data in the source data file.

Example

The following example defines a password and then uses the password to import data from a Microsoft Access database file to an ACL table named acc_codes.

SET ECHO NONE
SET PASSWORD 1 TO "qr347wx"
SET ECHO ON
IMPORT ACCESS TO acc_codes PASSWORD 1
"C:\ACL DATA\Sample Data Files\acc_codes.fil" FROM "Acceptable_Codes.mdb"
TABLE "[Acceptable_Codes]" CHARMAX 60 MEMOMAX 70


(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback