![background image](http://html1.mh-extra.com/html/national-instruments/bridgeview/bridgeview_user-manual_3445534417.webp)
Appendix B
Citadel and Open Database Connectivity
B-12
©
National Instruments Corporation
Using Microsoft Access with Citadel
The exact operation of Microsoft Access might change from version to
version. Look in the online help for Microsoft Access for how to connect
to an ODBC Data Source for the exact instructions for your version of
Microsoft Access.
Note
The SQL/92 standard states that a delimited identifier is any string of not more
than 128 characters enclosed in quotation marks. It further states that characters
within a delimited identifier are exempt from SQL syntax checking.
Unfortunately, Microsoft Access performs its own syntax checking for ODBC
queries using a non-standard SQL syntax— even within delimited identifiers. For
this reason, National Instruments provides a Convert Special Characters selection
in the Citadel ODBC Setup dialog box. When selected, the ODBC driver converts
the disallowed characters to something acceptable to Access, as follows:
Therefore, Access recognizes a BridgeVIEW identifier such as Modbus1.40001 as
the delimited identifier Modbus1\40001.
When you query Citadel data using MS Access, You must use Microsoft
Access’s non-standard SQL syntax in your select statement. Be sure to use
the special characters that are converted for Access compatibility and
double quotes around BridgeVIEW thread names. Finally, you must use
square brackets [ ] around identifiers, and #’s around time stamps. For
example, to retrieve LocalTime, Liquid, and Powder where LocalTime is
less than 10/22/95 18:00:00, and where Interval is one second, enter:
SELECT LocalTime, ["Liquid"], ["Powder"]
FROM Threads
WHERE LocalTime < #10/22/96 6:00:00 PM#
AND Interval = '0:01'
To query Citadel from within MS Access, open a database, select File»Get
External Data…
and then click Import
In the Import dialog box, in the
Files of Type box, select ODBC Databases(). In the SQL Data Sources
dialog box, choose your Citadel Data Source, as shown here.
Disallowed Character
Converted To
period ( . )
backslash ( \ )
ampersand ( & )
at sign ( @ )
exclamation ( ! )
vertical bar ( | )