TFORMer SDK - NET 8
Public Member Functions | Properties | List of all members
DataSourceOdbc Class Reference

Specialized DataSource for ODBC data. More...

Public Member Functions

ComputedField AddComputedField (string name)
 Creates and adds a ComputedField to the DataSource. More...
 
DSFieldMapping AddFieldMapping (string name)
 Creates and adds a DSFieldMapping to the DataSource. More...
 
DataSourceParameter AddParameter (string name)
 Creates and adds a DataSourceParameter to the DataSource. More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
ComputedField GetComputedField (string name)
 Gets a ComputedField defined in the DataSource. More...
 
DSFieldMapping GetFieldMapping (string name)
 Gets a DSFieldMapping defined in the DataSource. More...
 
DataSourceParameter GetParameter (string name)
 Gets a DataSourceParameter defined in the DataSource. More...
 
void RemoveComputedField (ComputedField computedField)
 Removes the ComputedField from the DataSource. More...
 
void RemoveComputedField (string name)
 Removes the ComputedField from the DataSource. More...
 
void RemoveFieldMapping (DSFieldMapping fieldMapping)
 Removes the DSFieldMapping from the DataSource. More...
 
void RemoveFieldMapping (string name)
 Removes the DSFieldMapping from the DataSource. More...
 
void RemoveParameter (DataSourceParameter datasourceParameter)
 Removes the DataSourceParameter from the DataSource. More...
 
void RemoveParameter (string name)
 Removes the DataSourceParameter from the DataSource. More...
 
override string ToString ()
 Returns a string representation of the instance. More...
 

Properties

string Comment [get, set]
 Gets/Sets the comment for the DataSource. More...
 
string CopyColumnName [get, set]
 Gets/Sets the CopyColumnName of the DataSource. More...
 
string Description [get, set]
 Gets/Sets the description of the DataSource. More...
 
string Dsn [get, set]
 Gets/Sets the DSN of the DataSourceOdbc. More...
 
ComputedField FirstComputedField [get]
 Gets the first ComputedField defined in the DataSource. More...
 
DSFieldMapping FirstFieldMapping [get]
 Gets the first DSFieldMapping defined in the DataSource. More...
 
DataSourceParameter FirstParameter [get]
 Gets the first DataSourceParameter defined in the DataSource. More...
 
bool HandleEscapeSequences [get, set]
 Gets/Sets if escape sequences should be translated on data retrieval or not. More...
 
bool IsDefault [get]
 Gets a value indicating whether this object stores the default DataSource. More...
 
string Name [get, set]
 Gets/Sets the name of the DataSource. More...
 
DataSource Next [get]
 Gets the next DataSource instance defined in the Project. More...
 
int NumberOfComputedFields [get]
 Gets the number of ComputedFields defined in the DataSource. More...
 
int NumberOfFieldMappings [get]
 Gets the number of DSFieldMappings defined in the DataSource. More...
 
int NumberOfParameters [get]
 Gets the number of DataSourceParameters defined in the DataSource. More...
 
string Password [get, set]
 Gets/Sets the password for the database connection. More...
 
string SqlSelect [get, set]
 Gets/Sets the SQL SELECT statement of the DataSourceOdbc. More...
 
DataSourceType Type [get]
 Gets the type of the DataSource. More...
 
string User [get, set]
 Gets/Sets the user-name for the database connection. More...
 

Detailed Description

Specialized DataSource for ODBC data.

Overview

DataSourceOdbc is a specialized DataSource for importing data from an ODBC database. This class is used to manipulate existing DataSourceOdbc objects.
To create a new DataSource use TFORMer Designer or Project.AddDataSource.

The main properties to characterize a DataSourceOdbc are:

Modifying an Existing ODBC DataSource

Sample source code for modifying an existing ODBC-DataSource:

// Retrieve the global Project
// DataSources are defined in a Project or a global Project
Project project = repository.GlobalProject;
// Retrieve the DataSource by name
// Since we know the type of the DataSource, we can cast it to DataSourceOdbc
DataSourceOdbc dataSource = (DataSourceOdbc) (project.GetDataSource("ODBC"));
// Modify some DataSource properties
dataSource.User = "";
dataSource.Password = "";
Specialized DataSource for ODBC data.
Definition: DataSourceODBC.cs:17
Provides access to Project information of a Repository or a stand-alone link FormLayout.
Definition: Project.cs:22
DataSource GetDataSource(string name)
Gets the DataSource information from the Project.
Definition: Project.cs:613

Member Function Documentation

◆ AddComputedField()

ComputedField AddComputedField ( string  name)
inherited

Creates and adds a ComputedField to the DataSource.

Parameters
nameThe name of the ComputedField
Returns
A new ComputedField
See also
ComputedField

◆ AddFieldMapping()

DSFieldMapping AddFieldMapping ( string  name)
inherited

Creates and adds a DSFieldMapping to the DataSource.

Parameters
nameThe name of the DataField for which a DSFieldMapping should be created.
Returns
A new DSFieldMapping

◆ AddParameter()

DataSourceParameter AddParameter ( string  name)
inherited

Creates and adds a DataSourceParameter to the DataSource.

Parameters
nameThe name of the DataSourceParameter
Returns
A new DataSourceParameter
See also
DataSourceParameter

◆ Dispose()

void Dispose ( )
inherited

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

◆ GetComputedField()

ComputedField GetComputedField ( string  name)
inherited

Gets a ComputedField defined in the DataSource.

Parameters
nameThe name of the ComputedField
Returns
A valid object instance or null
See also
ComputedField

◆ GetFieldMapping()

DSFieldMapping GetFieldMapping ( string  name)
inherited

Gets a DSFieldMapping defined in the DataSource.

Retrieves the DSFieldMapping for a given DataField name from the DataSource

Parameters
nameThe name of a DataField
Returns
A valid object instance or null

◆ GetParameter()

DataSourceParameter GetParameter ( string  name)
inherited

Gets a DataSourceParameter defined in the DataSource.

Parameters
nameThe name of the DataSourceParameter
Returns
A valid object instance or null
See also
DataSourceParameter

◆ RemoveComputedField() [1/2]

void RemoveComputedField ( ComputedField  computedField)
inherited

Removes the ComputedField from the DataSource.

Parameters
computedFieldThe ComputedField
See also
ComputedField

◆ RemoveComputedField() [2/2]

void RemoveComputedField ( string  name)
inherited

Removes the ComputedField from the DataSource.

Parameters
nameThe name of the ComputedField
See also
ComputedField

◆ RemoveFieldMapping() [1/2]

void RemoveFieldMapping ( DSFieldMapping  fieldMapping)
inherited

Removes the DSFieldMapping from the DataSource.

Parameters
fieldMappingThe DSFieldMapping

◆ RemoveFieldMapping() [2/2]

void RemoveFieldMapping ( string  name)
inherited

Removes the DSFieldMapping from the DataSource.

Parameters
nameThe name of the DataField for which the mapping should be deleted

◆ RemoveParameter() [1/2]

void RemoveParameter ( DataSourceParameter  datasourceParameter)
inherited

Removes the DataSourceParameter from the DataSource.

Parameters
datasourceParameterThe DataSourceParameter
See also
DataSourceParameter

◆ RemoveParameter() [2/2]

void RemoveParameter ( string  name)
inherited

Removes the DataSourceParameter from the DataSource.

Parameters
nameThe name of the DataSourceParameter
See also
DataSourceParameter

◆ ToString()

override string ToString ( )

Returns a string representation of the instance.

Returns
A string representation of the instance

Property Documentation

◆ Comment

string Comment
getsetinherited

Gets/Sets the comment for the DataSource.

Returns
The comment for the DataSource

◆ CopyColumnName

string CopyColumnName
getsetinherited

Gets/Sets the CopyColumnName of the DataSource.

Returns
The CopyColumnName of the DataSource
See also
DataSource

◆ Description

string Description
getsetinherited

Gets/Sets the description of the DataSource.

Returns
The description of the DataSource

◆ Dsn

string Dsn
getset

Gets/Sets the DSN of the DataSourceOdbc.

The DSN represents the name of the database connection as defined in the Microsoft Windows Control Panel. Please keep in mind that the DSN is a part of the connection string and thus a complete specification is required.

Returns
The DSN of the DataSourceOdbc

◆ FirstComputedField

ComputedField FirstComputedField
getinherited

Gets the first ComputedField defined in the DataSource.

Returns
The first ComputedField object in the list or null
See also
ComputedField

◆ FirstFieldMapping

DSFieldMapping FirstFieldMapping
getinherited

Gets the first DSFieldMapping defined in the DataSource.

Returns
The first DSFieldMapping in the list or null

◆ FirstParameter

DataSourceParameter FirstParameter
getinherited

Gets the first DataSourceParameter defined in the DataSource.

Returns
The first DataSourceParameter defined in the DataSource or null
See also
DataSourceParameter

◆ HandleEscapeSequences

bool HandleEscapeSequences
getsetinherited

Gets/Sets if escape sequences should be translated on data retrieval or not.

Returns
true if escape sequences should be translated.
See also
Escape Sequences, DataSource

◆ IsDefault

bool IsDefault
getinherited

Gets a value indicating whether this object stores the default DataSource.

Returns
true if this DataSource is the default DataSource.
See also
DataSource

◆ Name

string Name
getsetinherited

Gets/Sets the name of the DataSource.

Returns
The name of the DataSource

◆ Next

DataSource Next
getinherited

Gets the next DataSource instance defined in the Project.

A Project stores a list of DataSource objects. To retrieve the first DataSource in the Project see Project.FirstDataSource.

Returns
null if there aren't other instances in the Project, otherwise a valid instance of this class (DataSourceCsv, DataSourceOdbc or DataSourceXml)
See also
Project

◆ NumberOfComputedFields

int NumberOfComputedFields
getinherited

Gets the number of ComputedFields defined in the DataSource.

Returns
The number of ComputedFields defined in the DataSource
See also
ComputedField

◆ NumberOfFieldMappings

int NumberOfFieldMappings
getinherited

Gets the number of DSFieldMappings defined in the DataSource.

Returns
The number of DSFieldMappings defined in the DataSource

◆ NumberOfParameters

int NumberOfParameters
getinherited

Gets the number of DataSourceParameters defined in the DataSource.

Returns
The number of DataSourceParameters defined in the DataSource
See also
DataSourceParameter

◆ Password

string Password
getset

Gets/Sets the password for the database connection.

It depends on the database connection if the password is required or not.

Returns
The password for the DSN

◆ SqlSelect

string SqlSelect
getset

Gets/Sets the SQL SELECT statement of the DataSourceOdbc.

Returns
The SQL SELECT statement of the DataSourceOdbc

◆ Type

DataSourceType Type
getinherited

Gets the type of the DataSource.

The DataSourceType is read-only, and is set on creation. It specifies the type of a DataSource (e.g. DataSourceOdbc, DataSourceCsv, DataSourceXml).

Returns
The DataSourceType of the DataSource

◆ User

string User
getset

Gets/Sets the user-name for the database connection.

It depends on the database connection if the user-name is required or not.

Returns
The user-name for the DSN

© 2006-2023 - all rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Thu Dec 28 2023 18:45:19 for TFORMer SDK - NET with doxygen 1.9.4