Table of Contents

Class OdbcDataSourceBase

Namespace
CENTREL.XIA.Configuration.Types
Assembly
CENTREL.XIA.Configuration.Types.dll

Represents an individual open database connectivity (ODBC) data source.

public abstract class OdbcDataSourceBase : GlobalSerializableClassicBase, IComparable<OdbcDataSourceBase>
Inheritance
OdbcDataSourceBase
Implements
Derived

Constructors

OdbcDataSourceBase()

Initializes a new instance of the CENTREL.XIA.Configuration.Types.OdbcDataSourceBase class.

public OdbcDataSourceBase()

Properties

Description

Gets or sets the user defined description of the data source.

public string Description { get; set; }

Property Value

string

Driver

Gets or sets the absolute path to the driver file to use - for example "C:\PROGRA~1\COMMON~1\MICROS~1\OFFICE15\ACEODBC.DLL".

public string Driver { get; set; }

Property Value

string

DriverName

Gets or sets the driver name - for example "SQL Server Native Client 11.0".

public string DriverName { get; set; }

Property Value

string

Index

Gets the index used by the data comparer in the format "Name [Platform]", this is required as data sources for both 32bit and 64bit systems can share the same name.

[Browsable(false)]
public string Index { get; }

Property Value

string

Name

Gets or sets the name of the data source. The name is unique only for the platform to which it is assigned. Therefore there can be a 32bit and 64bit ODBC data source with the same name.

public string Name { get; set; }

Property Value

string

Platform

Gets or sets the platform of the driver that is to be used for the ODBC connection - either x86 or x64.

public OdbcDriverPlatform Platform { get; set; }

Property Value

OdbcDriverPlatform

Properties

Gets or sets the properties for the data source.

public OdbcDataSourceProperties Properties { get; set; }

Property Value

OdbcDataSourceProperties

TypeDisplayName

Gets the display name of the type of data source - for example "MySQL" or "SQL Native Client".

public string TypeDisplayName { get; }

Property Value

string

Methods

CompareTo(OdbcDataSourceBase)

Compares two ODBC data sources to allow sorting by name.

public int CompareTo(OdbcDataSourceBase other)

Parameters

other OdbcDataSourceBase

The data source to compare to.

Returns

int

FromDriverFileName(string)

Generates a new CENTREL.XIA.Configuration.Types.WindowsODBCDataSource of the appropriate type by determining the driver type from the driver name and path.

public static OdbcDataSourceBase FromDriverFileName(string driver)

Parameters

driver string

The absolute path to the driver file.

Returns

OdbcDataSourceBase

A new data source of the appropriate type.

ToString()

Returns the ODBC data source as a human readable string.

public override string ToString()

Returns

string

The ODBC data source as a human readable string.