Using CitectSCADA > Exchanging Data with Other Applications > Using ODBC drivers > Using CitectSCADA as an ODBC server

Using CitectSCADA as an ODBC server

The ODBC server support allows CitectSCADA to function as an SQL database server. This will allow third-party applications that support ODBC to access data directly from CitectSCADA. This means that users can have direct access to data in CitectSCADA without having to develop Cicode or reports to export the data.

Currently, the CitectSCADA ODBC server allows variable tags to be accessed. The table for the variable tags is named 'TAGS' and the format is as follows.


Variable tag name

read only


The current runtime value


CitectSCADA can only function as a database server at runtime. Using tags through ODBC at runtime can still add to your CitectSCADA License point count. Once the dynamic point count is greater than the license point count, the software protection mechanism will shutdown CitectSCADA runtime. Therefore, when accessing tags via the ODBC server, it's important to keep aware of how many points you have used. For details see License point count in the Installation and Configuration Guide.

Setting up the CitectSCADA ODBC server:

You need to have TCP/IP installed on your computer first.

  1. Choose Start | Settings | Control Panel.
  2. Double-click the ODBC icon.
  3. Click Add on the User DSN tab.
  4. Note: If you select other tabs you will see that the CitectSCADA ODBC driver has been automatically installed.

  5. Select the Citect Driver from the list and click Finish.
  6. Enter "Citect" in the Data Source field. If you do not want to use this name, make sure the name you use is one word.
  7. Enter the Computer Name in the Host field. The Computer Name is specified in the Network section of the Control Panel.
  8. Click OK.

Accessing the CitectSCADA ODBC server using MS Query (V2.00):

All ODBC capable applications use different ways to construct queries for accessing CitectSCADA tags. The example instructions for using MS Query, given here, show a simple implementation. MS Excel and MS Access use the same method.

  1. Verify that you have MS Query installed on your computer.
  2. Set up the CitectSCADA ODBC server.
  3. Run CitectSCADA.
  4. Run MS Query.
  5. From the File menu (in MS Query) select New Query.
  6. Select the CitectSCADA Data Source Name (DSN) from the Available Data Sources list. Click the Use button.
  7. Select the Tags table. Click the Add button and then the Close button.
  8. You can now run a query to extract the Tag data from CitectSCADA. The simplest way to see this is by double-clicking Names and Tags.

Accessing the CitectSCADA ODBC server using MS Query (V8.00):

Unlike Version 2.00, User DSNs are not used by Version 8.00. Instead it uses File DSNs which by default are stored in Program Files\Common Files\ODBC\Data Source folder. File DSNs are not stored in the Windows registry, they are text files given the .DSN extension. When you connect to an existing data source, only the available File DSNs that are stored on that PC are displayed. MS Query V8.00 does not display User or System DSNs. The simplest solution is to create a File DSN that points to a User DSN.

To create a file DSN that points to a user DSN:

  1. Use a text editor (Notepad for example) and create a file containing the following two lines:
  2. [ODBC]

    where <MyUserDSN> is the name of an existing user DSN that you have created via the ODBC icon in the Control Panel.

  3. Click Save As on the File menu and type a name that includes a .DSN file extension. For example, "Citect_File.dsn" is a valid name. Include the quotation marks so that the .DSN file name extension is added correctly. Save it to the default File DSN directory listed above, then it will appear in the DSN list box.
  4. Open the ODBC Manager from the Control Panel and verify that you can see your newly created File.DSN.
  5. Open the ODBC Manager from the Control Panel and verify that you have created a User DSN called <MyUsrDSN>. For example:
    1. Select Citect Driver and click Finish.
    2. Type "Citect" in the Data Source field (i.e., <MyUsrDSN>).
    3. Enter Computer Name in the Host field.

When you run MS Query, you can now select your File DSN from the list.

See Also