SQL/MX Connectivity Service Manual for SQL/MX Release 3.2 (H06.25+, J06.14+)
B Using Microsoft Access with ODBC/MX
Microsoft Access applications interact in a special way with NonStop servers.
To enable Microsoft Access, use the NSM/web SET property sheet tab or MXCI to set the
environment variables SQL_ATTR_ACCESS_VERSION, and SQL_ATTR_MAP_DATATYPE for the
data source to be used by Microsoft Access. If these environment variables are not set, you may
receive errors when linking tables or retrieving data from tables.
To enable and disable Read Only Access mode, set the environment variable
SQL_ATTR_ACCESS_MODE.
SQL_ATTR_ACCESS_VERSION for Microsoft Access
• To set the attribute:
In the NSM/web SET tab for the data source, set this attribute to 1997 or 2000. For
Microsoft Access 2002 and later, set it to 2000. See “Reconfiguring Server Data Sources”
(page 29) for details about using NSM/web to change settings.
◦
◦ Using MXCI in MXCS mode, the syntax is:
CS> add evar <dsname>.SQL_ATTR_MSACCESS_VERSION, type set, value
‘2000’;
• The setting of this attribute defines this behavior:
Sets SQL_ATTR_ACCESS_MODE attribute to SQL_MODE_READ_WRITE. This setting takes
precedence of any setting made by the client ODBC application.
◦
◦ SQLStatistics returns only unique indexes.
If this attribute is not set, a Microsoft Access application may fail to update, insert, or delete rows
in linked tables and it may not allow updates to tables using the graphical record sets.
SQL_ATTR_MAP_DATATYPE for Microsoft Access
• To set the attribute:
In the NSM/web SET tab for the data source, set this attribute to BINGINT_TO_NUMERIC.
This allows the ODBC driver to map the BIGINT column type to NUMERIC (19,0) for
Microsoft applications that cannot process BIGINT.
SQL_ATTR_MSACCESS_VERSION must be set to 2000 for this mapping to take effect.
◦
See “Reconfiguring Server Data Sources” (page 29) for details about using NSM/web
to change settings.
◦ Using MXCI in MXCS mode, the syntax is:
CS> add evar <dsname>.SQL_ATTR_MAP_DATATYPE,type set, value
‘BIGINT_TO_NUMERIC’;
• Setting the SQL_ATTR_MAP_DATATYPE attribute defines this behavior:
BIGINT data types are returned as NUMERIC (19,0).◦
◦ UNSIGNED INT columns are returned as NUMERIC (19,0) for ODBC 2.0 applications.
◦ Tables imported using the NUMERIC (19,0) data type cannot be exported again.
SQL_ATTR_ACCESS_VERSION for Microsoft Access 77










