TDAConnectionStringParser

Overview

TDAConnectionStringParser is a simple class that provides all the methods to work with Data Abstract connection strings. Connection objects make use of this class in the ApplyConnectionString method.

Location

 

constructor Create

Creates an object and parses the aConnectionString string.

constructor Create(const aConnectionString: string)

Parameters:

  • aConnectionString: connection string.

AuxDriver

Auxiliary driver

property AuxDriver: string read write

AuxParamNames

Returns the name part of the AuxParams that are name-value pairs.

property AuxParamNames[Index: Integer]: string read

AuxParams

Value of specified auxiliary parameter.

property AuxParams[Name: string]: string read write

AuxParamsCount

Indicates the number of AuxParams.

property AuxParamsCount: Integer read

AuxParamsString

Returns the AuxParams as string.

property AuxParamsString: string read

BuildString

Creates a connection string based on DriverID, AuxDriver, Server, Database, UserId, Password and AuxParams properties.

function BuildString: string

Clear

Clears all properties.

procedure Clear

Database

Database

property Database: string read write

DriverID

The driver ID.

property DriverID: string read write

ExtractDriverID

Extracts the DriverID from the specified string.

class function ExtractDriverID(const aConnectionString: string): string

Parameters:

  • aConnectionString: specified connection string.

Parse

Parses the aConnectionString string to DriverID, AuxDriver, Server, Database, UserId, Password and AuxParams values.

procedure Parse(const aConnectionString: string)

Parameters:

  • aConnectionString: connection string.

Password

Password

property Password: string read write

Server

Server

property Server: string read write

UserID

UserID

property UserID: string read write

 

AuxDriver

Auxiliary driver

property AuxDriver: string read write

AuxParamNames

Returns the name part of the AuxParams that are name-value pairs.

property AuxParamNames[Index: Integer]: string read

AuxParams

Value of specified auxiliary parameter.

property AuxParams[Name: string]: string read write

AuxParamsCount

Indicates the number of AuxParams.

property AuxParamsCount: Integer read

AuxParamsString

Returns the AuxParams as string.

property AuxParamsString: string read

Database

Database

property Database: string read write

DriverID

The driver ID.

property DriverID: string read write

Password

Password

property Password: string read write

Server

Server

property Server: string read write

UserID

UserID

property UserID: string read write

 

ExtractDriverID

Extracts the DriverID from the specified string.

class function ExtractDriverID(const aConnectionString: string): string

Parameters:

  • aConnectionString: specified connection string.

 

constructor Create

Creates an object and parses the aConnectionString string.

constructor Create(const aConnectionString: string)

Parameters:

  • aConnectionString: connection string.

BuildString

Creates a connection string based on DriverID, AuxDriver, Server, Database, UserId, Password and AuxParams properties.

function BuildString: string

Clear

Clears all properties.

procedure Clear

Parse

Parses the aConnectionString string to DriverID, AuxDriver, Server, Database, UserId, Password and AuxParams values.

procedure Parse(const aConnectionString: string)

Parameters:

  • aConnectionString: connection string.