Geo SCADA Expert ODBC Connection String Keywords and Values

To create an ODBC Client - System connection programmatically, you can use a connection string. The connection string has to contain specific keywords and values.

The ClearSCADA (Geo SCADA Expert) ODBC driver supports the following keywords and values:

Keyword Value

ALLOWANONYMOUS

Yes or No.
When Yes, the ClearSCADA ODBC driver will allow un-authenticated connections (a valid user name and password is not required). Yes is the default value.
When No, the string has to include the UID keyword and values. This is because the ClearSCADA ODBC driver is set to only allow authenticated connections (connections made when a valid user name and password are provided).

DRIVER

This has to be set to ClearSCADA Driver (to preserve backwards compatibility with earlier versions of our product).

If you do not specify a DSN in your string, you will need to include the DRIVER keyword and value. This is because a connection has to include information for the DRIVER and the SERVER.

If you are specifying an existing DSN, the connection can use the DRIVER and SERVER (System) settings that are in place for the DSN.

DSN

You can either:

Define the name of an existing ODBC data source (created using the ODBC Data Source Administrator, Access the ODBC Data Source Administrator Tool). If you specify an existing DSN, the values you include for the keywords in your string will take precedence over the matching settings in the ODBC Data Source Administrator. For example, if you specify a DNS and set LOCALTIME to Yes in your string, the LOCALTIME for the connection is Yes, even if the DNS local time setting is set to No (disabled).

Or:

Do not include a DSN. The settings you define in the string will be used for the connection but will not be associated with a DSN.

If you define a DSN that does not exist, the connection string will be unsuccessful. The DSN can only be an existing DSN name or not defined at all.

LOCALTIME

Yes or No.

When Yes, the ClearSCADA ODBC driver attempts to convert the time stamp values to the local time zone.
When No, the ClearSCADA ODBC driver leaves the time stamps in UTC (Coordinated Universal Time). No is the default value.

LOGINTIMEOUT

The amount of time, in seconds, permitted for a connection attempt. If a connection attempt is made and is unable to complete successfully within the LOGINTIMEOUT, the connection attempt is ‘timed out’.

PWD

The password for the login when ALLOWANONYMOUS is NO and the UID attribute is being used.

SERVER

If you do not specify a DSN in your string, you must include the DRIVER and either SERVER or SRVR.

SRVR

If you do not specify a DSN in your string, you must include the DRIVER and either SERVER or SRVR.

SYSTEMSXML

The location of the Systems.xml file. If this is not specified within the string, the default location of the file is used.

UID

The user name of a valid login account. This is needed when ALLOWANONYMOUS is set to No.

ZERODATENULL

Yes or No.

When Yes, the ClearSCADA ODBC driver converts zero time stamp values (midnight on 1-Jan 1601) to NULL. Yes is the default setting as this helps inter-operability with some external programs.

When No, zero date values are returned to the client as is - they are not converted.

For an ODBC Client - System connection to be successful, the system and driver need to be specified. If you define an existing DSN in your string, the system and driver settings for the DSN can be used, and so do not need to be specified in the string. However, if you do not specify a DSN, your string must contain the DRIVER keyword and value and either SERVER or SRVR and a valid value. SERVER and SRVR are the programmatical equivalent of the System setting when creating a DSN Configure the ODBC DSN Settings.

Example:

The following strings could be used to define an ODBC - Geo SCADA Expert System connection in a program on the ODBC client:

using (var connection = new OdbcConnection( "DSN=CSDSN" ))

This creates a new ODBC - ClearSCADA (Geo SCADA Expert) System connection that uses the settings of an existing DSN named ‘CSDSN’. The existing DSN already has the minimum requirements in place (a System and a Driver) and may also have settings for passwords, user names, and so on.

using ( var connection = new OdbcConnection( "Driver=ClearSCADA Driver;Server=CSDB; ALLOWANONYMOUS=NO; UID=Administrator; PWD=CSADM64;" )

This string creates a new ODBC-ClearSCADA (Geo SCADA Expert) System connection that does not reference an existing DSN. This means that the string has to contain the DRIVER and SERVER, plus any other settings that are required. In this case, the string sets the connection to require a log on, with the log on being a user name of Administrator and password of CSADM64.


Disclaimer

Geo SCADA Expert 2020