Open Database Connectivity (ODBC)

Help Contents

Introduction

ODBC allows an ODBC aware application to interface to a data source directly without any special programming. You can use ODBC to link Fernhill SCADA to any of the following:

ODBC Architecture

Use Cases

Examples of how you can use ODBC aware applications with Fernhill SCADA include:

ApplicationUse(s)
Microsoft Excel Retrieve tag values into a spreadsheet.
See Link to Microsoft Excel for a detailed walkthrough.
Microsoft Access Import tag data into a table in Microsoft Access.
See Link to Microsoft Access for a detailed walkthrough.
Microsoft SQL Server Link tag data into a table in SQL server.
See Link to Microsoft SQL Server for a detailed walkthrough.
SAP Crystal Reports Generate reports using data extracted from Fernhill SCADA.
See Link to SAP Crystal Reports for a detailed walkthrough.
Using ODBC From C/C++ Retrieve data or update tag values from a custom application written in the C/C++ language. See Using ODBC from C/C++ for further information.
Using ODBC From Python Retrieve data or update tag values from a custom application written in the Python language. See Using ODBC from Python for further information.
Using ODBC From CLR Retrieve data or update tag values from a custom application written in a common runtime language (C#, VB.NET, ...). See Using ODBC from CLR for further information.

DSN

Most ODBC aware applications connect to a database using a DSN. The DSN defines:

For further information see Setting up an ODBC DSN.

Schema Information

You can explore the data schema in Fernhill SCADA using the SQL Test Tool. Choose an option from the File, Open Schema menu to browse the schema information.

ODBC API Functions

The Fernhill SCADA ODBC Driver supports these ODBC Version 3 API functions:

FeatureFunctions
Manage handlesSQLAllocHandle,
SQLFreeHandle,
SQLFreeStmt
Manage connectionsSQLConnect,
SQLDisconnect,
SQLDriverConnect,
SQLBrowseConnect
Query metadataSQLTables,
SQLColumns,
SQLPrimaryKeys,
SQLGetTypeInfo,
SQLStatistics,
SQLSpecialColumns
Access result set metadataSQLColAttribute,
SQLDescribeCol,
SQLNumResultCols,
SQLRowCount
Bind result set columnsSQLBindCol
Manage parametersSQLBindParameter,
SQLNumParams,
SQLDescribeParam
Prepare and execute statementsSQLPrepare,
SQLExecute,
SQLExecDirect
Fetch result set rowsSQLFetch,
SQLFetchScroll,
SQLMoreResults
Retrieve column dataSQLGetData
Get and set attributesSQLGetEnvAttr,
SQLSetEnvAttr,
SQLGetConnectAttr,
SQLSetConnectAttr,
SQLGetStmtAttr,
SQLSetStmtAttr
Manipulate descriptorsSQLGetDescField,
SQLSetDescField,
SQLGetDescRec,
SQLSetDescRec
Obtain diagnostic informationSQLGetDiagField,
SQLGetDiagRec
Obtain driver capabilitiesSQLGetFunctions,
SQLGetInfo

Further Information

Setting up an ODBC Data Source Name (DSN)

For instructions on setting up an ODBC DSN to Fernhill SCADA.

Data Access

To learn about all the different ways of accessing data from Fernhill SCADA.

SQL

To learn about the SQL statements supported by Fernhill SCADA.

Glossary

For the meaning of terms used in Fernhill SCADA.