TDAMSSQLBaseConnection
Overview
TDAMSSQLBaseConnection implements common functionality for connections to Microsoft SQL Server. Currently, there is a TDAESDACConnection descendant class which provides connections via SDAC to the Microsoft SQL Server.
Location
- Unit: uDAADOInterfaces.pas
- Ancestry: TDAEngineBaseObject | TDAEConnection | TDAMSSQLBaseConnection
constructor Create virtual (declared in TDAEConnection)
Creates a new instance.
constructor Create(aDriver: TDAEDriver; aName: string)
Parameters:
- aDriver: owner driver.
- aName: name of connection.
ApplyConnectionString protected (declared in TDAEConnection)
Parses connection string via calling of DoApplyConnectionString
procedure ApplyConnectionString(const aConnectionString: string; aConnectionObject: TCustomConnection)
Parameters:
- aConnectionString: Connection string
- aConnectionObject: Connection
AssignCommandEventHandlers protected (declared in TDAEConnection)
Assigns OnBeforeExecute, OnAfterExecute and OnExecuteError events to correspondent events of aCommand
procedure AssignCommandEventHandlers(const aCommand: IDASQLCommand)
Parameters:
- aCommand: Command
AssignDatasetEventHandlers protected (declared in TDAEConnection)
Assigns OnBeforeOpen, OnAfterOpen and OnExecuteOpen events to correspondent events of aDataset
procedure AssignDatasetEventHandlers(const aDataset: IDADataset)
Parameters:
- aDataset: Dataset
BeginTransaction protected safecall (declared in TDAEConnection)
Starts transaction via calling of DoBeginTransaction.
function BeginTransaction: Integer
Close protected safecall (declared in TDAEConnection)
Closes a physical connection to the database back-end,
procedure Close
CommitTransaction protected safecall (declared in TDAEConnection)
Commits transaction via calling of DoCommitTransaction.
procedure CommitTransaction
Connected protected (declared in TDAEConnection)
Indicates whether the connection object currently has an active link to the database (true) or not (false). Usually, a Data Abstract connection connects to the database when it is created, and is not closed until discarded and eventually removed from the connection pool.
property Connected: Boolean read write
ConnectionDefinition protected (declared in TDAEConnection)
Holds a reference to the TDAConnection
property ConnectionDefinition: TDAConnection read
ConnectionManager protected (declared in TDAEConnection)
Holds a reference to the IDAConnectionManager.
property ConnectionManager: IDAConnectionManager read
ConnectionName protected (declared in TDAEConnection)
Holds the connection name.
property ConnectionName: string read
ConnectionObject protected (declared in TDAEConnection)
Provides access to the internal connection component and facilitates access to its properties in form of a collection of properties.
property ConnectionObject: TCustomConnection read write
ConnectionPool (declared in TDAEConnection)
Provides access to the IDAConnectionPool.
property ConnectionPool: IDAConnectionPool read write
ConnectionProperties protected (declared in TDAEConnection)
Returns value of given property
property ConnectionProperties[aPropertyName: string]: Variant read write
ConnectionString protected (declared in TDAEConnection)
Sets the database connection string that was used to open this connection. The exact content of this string depends on the driver and database you are using, but it will usually contain information such as the database name, user id and password, as well as additional connection parameters. Please refer to the reference for the specific driver for more details.
property ConnectionString: string read write
ConnectionType protected (declared in TDAEConnection)
Holds the connection type.
property ConnectionType: string read
CreateCustomConnection protected virtual abstract (declared in TDAEConnection)
Creates standard TCustomConnection
function CreateCustomConnection: TCustomConnection
CreateMacroProcessor protected override
Creates a macro processor.
function CreateMacroProcessor: TDASQLMacroProcessor
DoApplyConnectionString protected virtual (declared in TDAEConnection)
Parses connection string
procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection)
Parameters:
- aConnStrParser: Parser
- aConnectionObject: Connection
DoBeginTransaction protected virtual abstract (declared in TDAEConnection)
Starts transaction.
function DoBeginTransaction: Integer
DoCommitTransaction protected virtual abstract (declared in TDAEConnection)
Commits transaction.
procedure DoCommitTransaction
DoGetForeignKeys protected override
Fills ForeignKeys with actual foreign keys.
procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection)
Parameters:
- ForeignKeys: collection that will be filled.
DoGetInTransaction protected virtual abstract (declared in TDAEConnection)
Returns the transaction state.
function DoGetInTransaction: Boolean
DoGetLastAutoInc protected override
Returns last auto increment value.
function DoGetLastAutoInc(const GeneratorName: string): Integer
Parameters:
- GeneratorName: Specified generator name.
DoGetLastAutoIncValue protected override
Returns last auto increment value.
function DoGetLastAutoIncValue(const GeneratorName: string): Variant
Parameters:
- GeneratorName: Specified generator name.
DoGetQueryFields protected virtual safecall (declared in TDAEConnection)
Returns the fields of a specified SQL.
procedure DoGetQueryFields(const aSQL: string; aParamsIfNeeded: TDAParamCollection; out Fields: TDAFieldCollection)
Parameters:
- aSQL: given SQL
- aParamsIfNeeded: optional parameters
- Fields: fields of SQL
DoGetStoredProcedureNames protected override
Returns the list of stored procedures names.
procedure DoGetStoredProcedureNames(out List: IROStrings)
Parameters:
- List: Output list with names of stored procedures
DoGetStoredProcedureParams protected override
Retrieves the stored procedure params.
procedure DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection)
Parameters:
- aStoredProcedureName: Stored procedure name
- Params: Output collection of parameters
DoGetTableFields protected override
Returns the fields of a specified table.
procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection)
Parameters:
- aTableName: Specified data table name
- Fields: Output collection of data table fields
DoGetTableNames protected override
Returns the list of tables names.
procedure DoGetTableNames(out List: IROStrings)
Parameters:
- List: Output list of data table names
DoGetViewFields protected virtual safecall (declared in TDAEConnection)
Returns the fields of a specified view.
procedure DoGetViewFields(const aViewName: string; out Fields: TDAFieldCollection)
Parameters:
- aViewName: Specified view name
- Fields: Output collection of data table fields
DoGetViewNames protected override
Returns the list of view names.
procedure DoGetViewNames(out List: IROStrings)
Parameters:
- List: Output list of views
DoRollbackTransaction protected virtual abstract (declared in TDAEConnection)
Rollbacks the transaction.
procedure DoRollbackTransaction
Driver (declared in TDAEConnection)
Reference to the owner TDAEDriver.
property Driver: TDAEDriver read
GetConnected protected virtual safecall (declared in TDAEConnection)
Returns connection state.
function GetConnected: Boolean
GetDatabaseNames protected
Returns the list of available databases.
function GetDatabaseNames: IROStrings
GetDatasetClass protected virtual (declared in TDAEConnection)
Returns the actual TDAEDatasetClass descendant.
function GetDatasetClass: TDAEDatasetClass
GetForeignKeys protected safecall (declared in TDAEConnection)
Fills ForeignKeys with actual foreign keys via calling of DoGetForeignKeys.
procedure GetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection)
Parameters:
- ForeignKeys: collection that will be filled.
GetGeneratorNames protected
Returns the generators list in IROStrings format. You can use the strings property to expose the underlying TString instance wrapped by this interface.
function GetGeneratorNames: IROStrings
GetInTransaction protected safecall (declared in TDAEConnection)
Returns the transaction state via calling of DoGetInTransaction.
function GetInTransaction: Boolean
GetLastAutoInc protected safecall (declared in TDAEConnection)
Returns last auto increment value as integer value via calling of DoGetLastAutoInc
function GetLastAutoInc(const GeneratorName: string): Integer
Parameters:
- GeneratorName: Specified generator name.
GetLastAutoIncValue protected safecall (declared in TDAEConnection)
Returns last auto increment value as variant value via calling of DoGetLastAutoIncValue
function GetLastAutoIncValue(const GeneratorName: string): Variant
Parameters:
- GeneratorName: Specified generator name.
GetName protected safecall (declared in TDAEConnection)
Return the connection name.
function GetName: string
GetNextAutoinc protected safecall (declared in TDAEConnection)
Returns the next AutoInc value of a specified generator as integer value.
function GetNextAutoinc(const GeneratorName: string): Integer
Parameters:
- GeneratorName: Specified generator name.
GetNextAutoinc2 protected override
Returns the next value of a specified generator as integer value.
function GetNextAutoinc2(const GeneratorName: string): Variant
Parameters:
- GeneratorName: Specified generator name.
GetPassword protected virtual safecall (declared in TDAEConnection)
Returns the password.
function GetPassword: string
GetQueryBuilder protected override
Creates an instance of the TDAQueryBuilder.
function GetQueryBuilder: TDAQueryBuilder
GetQueryFields protected safecall (declared in TDAEConnection)
Returns the fields of a specified SQL via calling of DoGetQueryFields
procedure GetQueryFields(const aSQL: string; aParamsIfNeeded: TDAParamCollection; out Fields: TDAFieldCollection)
Parameters:
- aSQL: given SQL
- aParamsIfNeeded: optional parameters
- Fields: fields of SQL
GetQueryGenerator protected override
Returns correspondent TDASQLQueryGenerator instance
function GetQueryGenerator: TDASQLQueryGenerator
GetQuoteChars protected virtual safecall (declared in TDAEConnection)
Returns quote symbols as an array.
function GetQuoteChars: TDAQuoteCharArray
GetSPSelectSyntax protected override
Returns the syntax of a stored procedure for usage in a select query.
function GetSPSelectSyntax(HasArguments: Boolean): string
Parameters:
- HasArguments: parameters are present or not
GetStoredProcedureClass protected virtual (declared in TDAEConnection)
Returns the actual TDAEStoredProcedure descendant.
function GetStoredProcedureClass: TDAEStoredProcedureClass
GetStoredProcedureNames protected safecall (declared in TDAEConnection)
Returns the list of stored procedures names via calling of DoGetStoredProcedureNames.
procedure GetStoredProcedureNames(out List: IROStrings)
Parameters:
- List: list of stored procedures names
GetStoredProcedureParams protected safecall (declared in TDAEConnection)
Retrieves the stored procedure params.
procedure GetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection)
Parameters:
- aStoredProcedureName: stored procedure's name
- Params: stored procedure params.
GetTableFields protected safecall (declared in TDAEConnection)
Returns the fields of a specified table via calling of DoGetTableFields.
procedure GetTableFields(const aTableName: string; out Fields: TDAFieldCollection)
Parameters:
- aTableName: Specified data table name
- Fields: Output collection of data table fields
GetTableNames protected safecall (declared in TDAEConnection)
Returns the list of tables names via calling of DoGetTableNames.
procedure GetTableNames(out List: IROStrings)
Parameters:
- List: list of tables names.
GetUserID protected virtual safecall (declared in TDAEConnection)
Returns the user ID.
function GetUserID: string
GetViewFields protected safecall (declared in TDAEConnection)
Returns the fields of a specified view via calling of DoGetViewFields.
procedure GetViewFields(const aViewName: string; out Fields: TDAFieldCollection)
Parameters:
- aViewName: view's name
- Fields: fields of a specified view.
GetViewNames protected safecall (declared in TDAEConnection)
Returns the list of view names via calling of DoGetViewNames.
procedure GetViewNames(out List: IROStrings)
Parameters:
- List: list of view names.
GetWhereBuilder protected virtual safecall (declared in TDAEConnection)
Creates an instance of the TDASQL92WhereBuilder.
function GetWhereBuilder: TDASQLWhereBuilder
IdentifierIsQuoted protected virtual safecall (declared in TDAEConnection)
Returns True if the iIdentifier is quoted.
function IdentifierIsQuoted(const iIdentifier: string): Boolean
Parameters:
- iIdentifier: identifier.
IdentifierNeedsQuoting protected override
Returns True if the iIdentifier should be quoted.
function IdentifierNeedsQuoting(const iIdentifier: string): Boolean
Parameters:
- iIdentifier: identifier.
InTransaction protected (declared in TDAEConnection)
Returns the transaction state
property InTransaction: Boolean read
isAlive protected virtual safecall (declared in TDAEConnection)
Returns True if connection is alive.
function isAlive: Boolean
isAzure
Specifies if Azure server is used
property isAzure: Boolean read write
MacroProcessor (declared in TDAEConnection)
Returns the correspondent TDASQLMacroProcessor.
property MacroProcessor: TDASQLMacroProcessor read
MSSQLSchemaEnabled
False
by default.
property MSSQLSchemaEnabled: Boolean read write
Name protected (declared in TDAEConnection)
Returns a human-readable name for the connection.
property Name: string read
NewCommand protected virtual safecall (declared in TDAEConnection)
Creates an IDASQLCommand based on CommandType.
function NewCommand(const Text: string; CommandType: TDASQLStatementType; const aCommandName: string): IDASQLCommand
Parameters:
- Text: stored procedure's name or SQL statement (depends on command type)
- CommandType: command type
- aCommandName: command name
NewDataset protected virtual safecall (declared in TDAEConnection)
Returns a new IDADataset implementation that can be used to retrieve records from the database.
function NewDataset(const SQL: string; const aDatasetName: string): IDADataset
Parameters:
- SQL: SQL statement
- aDatasetName: Dataset's name
OnAfterExecuteCommand (declared in TDAEConnection)
Fires right after a command was executed.
property OnAfterExecuteCommand: TDAAfterExecuteCommandEvent read write
delegate: procedure OnAfterExecuteCommand(const Sender: IDASQLCommand; ActualSQL: string; ElapsedMilliseconds: Cardinal)
OnAfterOpenDataset (declared in TDAEConnection)
Fires after dataset was opened
property OnAfterOpenDataset: TDAAfterOpenDatasetEvent read write
delegate: procedure OnAfterOpenDataset(const Sender: IDADataset; ActualSQL: string; ElapsedMilliseconds: Cardinal)
OnBeforeExecuteCommand (declared in TDAEConnection)
Fires just before a command will be executed.
property OnBeforeExecuteCommand: TDABeforeExecuteCommandEvent read write
delegate: procedure OnBeforeExecuteCommand(const Sender: IDASQLCommand)
OnBeforeOpenDataset (declared in TDAEConnection)
Fires before dataset was opened
property OnBeforeOpenDataset: TDABeforeOpenDatasetEvent read write
delegate: procedure OnBeforeOpenDataset(const Sender: IDADataset)
OnExecuteCommandError (declared in TDAEConnection)
Fires when exception is detected during command execution
property OnExecuteCommandError: TDAExecuteCommandErrorEvent read write
delegate: procedure OnExecuteCommandError(const Sender: IDASQLCommand; ActualSQL: string; Error: Exception)
OnOpenDatasetError (declared in TDAEConnection)
Fired if error was occured duting opening of dataset
property OnOpenDatasetError: TDAOpenDatasetErrorEvent read write
delegate: procedure OnOpenDatasetError(const Sender: IDADataset; ActualSQL: string; Error: Exception)
Open protected safecall (declared in TDAEConnection)
Sets UserID and Password if they are present and opens a physical connection to the database back-end,
procedure Open(const aUserID: string; const aPassword: string)
Parameters:
- aUserID: username
- aPassword: password
Password protected (declared in TDAEConnection)
Defines the Password that was or will be used to open this connection. This value is usually obtained from the connection string.
property Password: string read write
QuoteFieldName protected virtual safecall (declared in TDAEConnection)
Quotes field name.
function QuoteFieldName(const aTableName: string; const aFieldName: string): string
Parameters:
- aTableName: table name.
- aFieldName: field name.
QuoteFieldNameIfNeeded protected virtual safecall (declared in TDAEConnection)
Quotes field name if is required.
function QuoteFieldNameIfNeeded(const aTableName: string; const aFieldName: string): string
Parameters:
- aTableName: table name.
- aFieldName: field name.
QuoteIdentifier protected virtual safecall (declared in TDAEConnection)
Quotes identifier.
function QuoteIdentifier(const iIdentifier: string): string
Parameters:
- iIdentifier: identifier.
QuoteIdentifierIfNeeded protected virtual safecall (declared in TDAEConnection)
Quotes identifier if is required.
function QuoteIdentifierIfNeeded(const iIdentifier: string): string
Parameters:
- iIdentifier: identifier.
RecreateMacroProcessor protected (declared in TDAEConnection)
Creates MacroProcessor from scratch
procedure RecreateMacroProcessor
RollbackTransaction protected safecall (declared in TDAEConnection)
Discards a transaction that was started with a prior call to BeginTransaction, via calling of DoRollbackTransaction. All changes made in the context of the transaction will be be discarded and not applied to the physical database. To persist the changes made, instead of discarding them, call CommitTransaction instead.
procedure RollbackTransaction
SetConnected protected override
Opens or closes a physical connection to the database back-end,
procedure SetConnected(Value: Boolean)
Parameters:
- Value: state
SetPassword protected virtual safecall (declared in TDAEConnection)
Sets the password.
procedure SetPassword(const Value: string)
Parameters:
- Value: password
SetUserID protected virtual safecall (declared in TDAEConnection)
Sets the user ID.
procedure SetUserID(const Value: string)
Parameters:
- Value: user ID
Test protected virtual safecall (declared in TDAEConnection)
Tests connections.
procedure Test
UseMacroProcessor protected (declared in TDAEConnection)
Specifies an usage of macro processor.
property UseMacroProcessor: Boolean read write
UserID protected (declared in TDAEConnection)
Holds the User ID that was or will be used to open this connection. This value is usually obtained from the connection string.
property UserID: string read write
Connected protected (declared in TDAEConnection)
Indicates whether the connection object currently has an active link to the database (true) or not (false). Usually, a Data Abstract connection connects to the database when it is created, and is not closed until discarded and eventually removed from the connection pool.
property Connected: Boolean read write
ConnectionDefinition protected (declared in TDAEConnection)
Holds a reference to the TDAConnection
property ConnectionDefinition: TDAConnection read
ConnectionManager protected (declared in TDAEConnection)
Holds a reference to the IDAConnectionManager.
property ConnectionManager: IDAConnectionManager read
ConnectionName protected (declared in TDAEConnection)
Holds the connection name.
property ConnectionName: string read
ConnectionObject protected (declared in TDAEConnection)
Provides access to the internal connection component and facilitates access to its properties in form of a collection of properties.
property ConnectionObject: TCustomConnection read write
ConnectionPool (declared in TDAEConnection)
Provides access to the IDAConnectionPool.
property ConnectionPool: IDAConnectionPool read write
ConnectionProperties protected (declared in TDAEConnection)
Returns value of given property
property ConnectionProperties[aPropertyName: string]: Variant read write
ConnectionString protected (declared in TDAEConnection)
Sets the database connection string that was used to open this connection. The exact content of this string depends on the driver and database you are using, but it will usually contain information such as the database name, user id and password, as well as additional connection parameters. Please refer to the reference for the specific driver for more details.
property ConnectionString: string read write
ConnectionType protected (declared in TDAEConnection)
Holds the connection type.
property ConnectionType: string read
Driver (declared in TDAEConnection)
Reference to the owner TDAEDriver.
property Driver: TDAEDriver read
InTransaction protected (declared in TDAEConnection)
Returns the transaction state
property InTransaction: Boolean read
isAzure
Specifies if Azure server is used
property isAzure: Boolean read write
MacroProcessor (declared in TDAEConnection)
Returns the correspondent TDASQLMacroProcessor.
property MacroProcessor: TDASQLMacroProcessor read
MSSQLSchemaEnabled
False
by default.
property MSSQLSchemaEnabled: Boolean read write
Name protected (declared in TDAEConnection)
Returns a human-readable name for the connection.
property Name: string read
Password protected (declared in TDAEConnection)
Defines the Password that was or will be used to open this connection. This value is usually obtained from the connection string.
property Password: string read write
UseMacroProcessor protected (declared in TDAEConnection)
Specifies an usage of macro processor.
property UseMacroProcessor: Boolean read write
UserID protected (declared in TDAEConnection)
Holds the User ID that was or will be used to open this connection. This value is usually obtained from the connection string.
property UserID: string read write
constructor Create virtual (declared in TDAEConnection)
Creates a new instance.
constructor Create(aDriver: TDAEDriver; aName: string)
Parameters:
- aDriver: owner driver.
- aName: name of connection.
ApplyConnectionString protected (declared in TDAEConnection)
Parses connection string via calling of DoApplyConnectionString
procedure ApplyConnectionString(const aConnectionString: string; aConnectionObject: TCustomConnection)
Parameters:
- aConnectionString: Connection string
- aConnectionObject: Connection
AssignCommandEventHandlers protected (declared in TDAEConnection)
Assigns OnBeforeExecute, OnAfterExecute and OnExecuteError events to correspondent events of aCommand
procedure AssignCommandEventHandlers(const aCommand: IDASQLCommand)
Parameters:
- aCommand: Command
AssignDatasetEventHandlers protected (declared in TDAEConnection)
Assigns OnBeforeOpen, OnAfterOpen and OnExecuteOpen events to correspondent events of aDataset
procedure AssignDatasetEventHandlers(const aDataset: IDADataset)
Parameters:
- aDataset: Dataset
BeginTransaction protected safecall (declared in TDAEConnection)
Starts transaction via calling of DoBeginTransaction.
function BeginTransaction: Integer
Close protected safecall (declared in TDAEConnection)
Closes a physical connection to the database back-end,
procedure Close
CommitTransaction protected safecall (declared in TDAEConnection)
Commits transaction via calling of DoCommitTransaction.
procedure CommitTransaction
CreateCustomConnection protected virtual abstract (declared in TDAEConnection)
Creates standard TCustomConnection
function CreateCustomConnection: TCustomConnection
CreateMacroProcessor protected override
Creates a macro processor.
function CreateMacroProcessor: TDASQLMacroProcessor
DoApplyConnectionString protected virtual (declared in TDAEConnection)
Parses connection string
procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection)
Parameters:
- aConnStrParser: Parser
- aConnectionObject: Connection
DoBeginTransaction protected virtual abstract (declared in TDAEConnection)
Starts transaction.
function DoBeginTransaction: Integer
DoCommitTransaction protected virtual abstract (declared in TDAEConnection)
Commits transaction.
procedure DoCommitTransaction
DoGetForeignKeys protected override
Fills ForeignKeys with actual foreign keys.
procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection)
Parameters:
- ForeignKeys: collection that will be filled.
DoGetInTransaction protected virtual abstract (declared in TDAEConnection)
Returns the transaction state.
function DoGetInTransaction: Boolean
DoGetLastAutoInc protected override
Returns last auto increment value.
function DoGetLastAutoInc(const GeneratorName: string): Integer
Parameters:
- GeneratorName: Specified generator name.
DoGetLastAutoIncValue protected override
Returns last auto increment value.
function DoGetLastAutoIncValue(const GeneratorName: string): Variant
Parameters:
- GeneratorName: Specified generator name.
DoGetQueryFields protected virtual safecall (declared in TDAEConnection)
Returns the fields of a specified SQL.
procedure DoGetQueryFields(const aSQL: string; aParamsIfNeeded: TDAParamCollection; out Fields: TDAFieldCollection)
Parameters:
- aSQL: given SQL
- aParamsIfNeeded: optional parameters
- Fields: fields of SQL
DoGetStoredProcedureNames protected override
Returns the list of stored procedures names.
procedure DoGetStoredProcedureNames(out List: IROStrings)
Parameters:
- List: Output list with names of stored procedures
DoGetStoredProcedureParams protected override
Retrieves the stored procedure params.
procedure DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection)
Parameters:
- aStoredProcedureName: Stored procedure name
- Params: Output collection of parameters
DoGetTableFields protected override
Returns the fields of a specified table.
procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection)
Parameters:
- aTableName: Specified data table name
- Fields: Output collection of data table fields
DoGetTableNames protected override
Returns the list of tables names.
procedure DoGetTableNames(out List: IROStrings)
Parameters:
- List: Output list of data table names
DoGetViewFields protected virtual safecall (declared in TDAEConnection)
Returns the fields of a specified view.
procedure DoGetViewFields(const aViewName: string; out Fields: TDAFieldCollection)
Parameters:
- aViewName: Specified view name
- Fields: Output collection of data table fields
DoGetViewNames protected override
Returns the list of view names.
procedure DoGetViewNames(out List: IROStrings)
Parameters:
- List: Output list of views
DoRollbackTransaction protected virtual abstract (declared in TDAEConnection)
Rollbacks the transaction.
procedure DoRollbackTransaction
GetConnected protected virtual safecall (declared in TDAEConnection)
Returns connection state.
function GetConnected: Boolean
GetDatabaseNames protected
Returns the list of available databases.
function GetDatabaseNames: IROStrings
GetDatasetClass protected virtual (declared in TDAEConnection)
Returns the actual TDAEDatasetClass descendant.
function GetDatasetClass: TDAEDatasetClass
GetForeignKeys protected safecall (declared in TDAEConnection)
Fills ForeignKeys with actual foreign keys via calling of DoGetForeignKeys.
procedure GetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection)
Parameters:
- ForeignKeys: collection that will be filled.
GetGeneratorNames protected
Returns the generators list in IROStrings format. You can use the strings property to expose the underlying TString instance wrapped by this interface.
function GetGeneratorNames: IROStrings
GetInTransaction protected safecall (declared in TDAEConnection)
Returns the transaction state via calling of DoGetInTransaction.
function GetInTransaction: Boolean
GetLastAutoInc protected safecall (declared in TDAEConnection)
Returns last auto increment value as integer value via calling of DoGetLastAutoInc
function GetLastAutoInc(const GeneratorName: string): Integer
Parameters:
- GeneratorName: Specified generator name.
GetLastAutoIncValue protected safecall (declared in TDAEConnection)
Returns last auto increment value as variant value via calling of DoGetLastAutoIncValue
function GetLastAutoIncValue(const GeneratorName: string): Variant
Parameters:
- GeneratorName: Specified generator name.
GetName protected safecall (declared in TDAEConnection)
Return the connection name.
function GetName: string
GetNextAutoinc protected safecall (declared in TDAEConnection)
Returns the next AutoInc value of a specified generator as integer value.
function GetNextAutoinc(const GeneratorName: string): Integer
Parameters:
- GeneratorName: Specified generator name.
GetNextAutoinc2 protected override
Returns the next value of a specified generator as integer value.
function GetNextAutoinc2(const GeneratorName: string): Variant
Parameters:
- GeneratorName: Specified generator name.
GetPassword protected virtual safecall (declared in TDAEConnection)
Returns the password.
function GetPassword: string
GetQueryBuilder protected override
Creates an instance of the TDAQueryBuilder.
function GetQueryBuilder: TDAQueryBuilder
GetQueryFields protected safecall (declared in TDAEConnection)
Returns the fields of a specified SQL via calling of DoGetQueryFields
procedure GetQueryFields(const aSQL: string; aParamsIfNeeded: TDAParamCollection; out Fields: TDAFieldCollection)
Parameters:
- aSQL: given SQL
- aParamsIfNeeded: optional parameters
- Fields: fields of SQL
GetQueryGenerator protected override
Returns correspondent TDASQLQueryGenerator instance
function GetQueryGenerator: TDASQLQueryGenerator
GetQuoteChars protected virtual safecall (declared in TDAEConnection)
Returns quote symbols as an array.
function GetQuoteChars: TDAQuoteCharArray
GetSPSelectSyntax protected override
Returns the syntax of a stored procedure for usage in a select query.
function GetSPSelectSyntax(HasArguments: Boolean): string
Parameters:
- HasArguments: parameters are present or not
GetStoredProcedureClass protected virtual (declared in TDAEConnection)
Returns the actual TDAEStoredProcedure descendant.
function GetStoredProcedureClass: TDAEStoredProcedureClass
GetStoredProcedureNames protected safecall (declared in TDAEConnection)
Returns the list of stored procedures names via calling of DoGetStoredProcedureNames.
procedure GetStoredProcedureNames(out List: IROStrings)
Parameters:
- List: list of stored procedures names
GetStoredProcedureParams protected safecall (declared in TDAEConnection)
Retrieves the stored procedure params.
procedure GetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection)
Parameters:
- aStoredProcedureName: stored procedure's name
- Params: stored procedure params.
GetTableFields protected safecall (declared in TDAEConnection)
Returns the fields of a specified table via calling of DoGetTableFields.
procedure GetTableFields(const aTableName: string; out Fields: TDAFieldCollection)
Parameters:
- aTableName: Specified data table name
- Fields: Output collection of data table fields
GetTableNames protected safecall (declared in TDAEConnection)
Returns the list of tables names via calling of DoGetTableNames.
procedure GetTableNames(out List: IROStrings)
Parameters:
- List: list of tables names.
GetUserID protected virtual safecall (declared in TDAEConnection)
Returns the user ID.
function GetUserID: string
GetViewFields protected safecall (declared in TDAEConnection)
Returns the fields of a specified view via calling of DoGetViewFields.
procedure GetViewFields(const aViewName: string; out Fields: TDAFieldCollection)
Parameters:
- aViewName: view's name
- Fields: fields of a specified view.
GetViewNames protected safecall (declared in TDAEConnection)
Returns the list of view names via calling of DoGetViewNames.
procedure GetViewNames(out List: IROStrings)
Parameters:
- List: list of view names.
GetWhereBuilder protected virtual safecall (declared in TDAEConnection)
Creates an instance of the TDASQL92WhereBuilder.
function GetWhereBuilder: TDASQLWhereBuilder
IdentifierIsQuoted protected virtual safecall (declared in TDAEConnection)
Returns True if the iIdentifier is quoted.
function IdentifierIsQuoted(const iIdentifier: string): Boolean
Parameters:
- iIdentifier: identifier.
IdentifierNeedsQuoting protected override
Returns True if the iIdentifier should be quoted.
function IdentifierNeedsQuoting(const iIdentifier: string): Boolean
Parameters:
- iIdentifier: identifier.
isAlive protected virtual safecall (declared in TDAEConnection)
Returns True if connection is alive.
function isAlive: Boolean
NewCommand protected virtual safecall (declared in TDAEConnection)
Creates an IDASQLCommand based on CommandType.
function NewCommand(const Text: string; CommandType: TDASQLStatementType; const aCommandName: string): IDASQLCommand
Parameters:
- Text: stored procedure's name or SQL statement (depends on command type)
- CommandType: command type
- aCommandName: command name
NewDataset protected virtual safecall (declared in TDAEConnection)
Returns a new IDADataset implementation that can be used to retrieve records from the database.
function NewDataset(const SQL: string; const aDatasetName: string): IDADataset
Parameters:
- SQL: SQL statement
- aDatasetName: Dataset's name
Open protected safecall (declared in TDAEConnection)
Sets UserID and Password if they are present and opens a physical connection to the database back-end,
procedure Open(const aUserID: string; const aPassword: string)
Parameters:
- aUserID: username
- aPassword: password
QuoteFieldName protected virtual safecall (declared in TDAEConnection)
Quotes field name.
function QuoteFieldName(const aTableName: string; const aFieldName: string): string
Parameters:
- aTableName: table name.
- aFieldName: field name.
QuoteFieldNameIfNeeded protected virtual safecall (declared in TDAEConnection)
Quotes field name if is required.
function QuoteFieldNameIfNeeded(const aTableName: string; const aFieldName: string): string
Parameters:
- aTableName: table name.
- aFieldName: field name.
QuoteIdentifier protected virtual safecall (declared in TDAEConnection)
Quotes identifier.
function QuoteIdentifier(const iIdentifier: string): string
Parameters:
- iIdentifier: identifier.
QuoteIdentifierIfNeeded protected virtual safecall (declared in TDAEConnection)
Quotes identifier if is required.
function QuoteIdentifierIfNeeded(const iIdentifier: string): string
Parameters:
- iIdentifier: identifier.
RecreateMacroProcessor protected (declared in TDAEConnection)
Creates MacroProcessor from scratch
procedure RecreateMacroProcessor
RollbackTransaction protected safecall (declared in TDAEConnection)
Discards a transaction that was started with a prior call to BeginTransaction, via calling of DoRollbackTransaction. All changes made in the context of the transaction will be be discarded and not applied to the physical database. To persist the changes made, instead of discarding them, call CommitTransaction instead.
procedure RollbackTransaction
SetConnected protected override
Opens or closes a physical connection to the database back-end,
procedure SetConnected(Value: Boolean)
Parameters:
- Value: state
SetPassword protected virtual safecall (declared in TDAEConnection)
Sets the password.
procedure SetPassword(const Value: string)
Parameters:
- Value: password
SetUserID protected virtual safecall (declared in TDAEConnection)
Sets the user ID.
procedure SetUserID(const Value: string)
Parameters:
- Value: user ID
Test protected virtual safecall (declared in TDAEConnection)
Tests connections.
procedure Test
OnAfterExecuteCommand (declared in TDAEConnection)
Fires right after a command was executed.
property OnAfterExecuteCommand: TDAAfterExecuteCommandEvent read write
delegate: procedure OnAfterExecuteCommand(const Sender: IDASQLCommand; ActualSQL: string; ElapsedMilliseconds: Cardinal)
OnAfterOpenDataset (declared in TDAEConnection)
Fires after dataset was opened
property OnAfterOpenDataset: TDAAfterOpenDatasetEvent read write
delegate: procedure OnAfterOpenDataset(const Sender: IDADataset; ActualSQL: string; ElapsedMilliseconds: Cardinal)
OnBeforeExecuteCommand (declared in TDAEConnection)
Fires just before a command will be executed.
property OnBeforeExecuteCommand: TDABeforeExecuteCommandEvent read write
delegate: procedure OnBeforeExecuteCommand(const Sender: IDASQLCommand)
OnBeforeOpenDataset (declared in TDAEConnection)
Fires before dataset was opened
property OnBeforeOpenDataset: TDABeforeOpenDatasetEvent read write
delegate: procedure OnBeforeOpenDataset(const Sender: IDADataset)
OnExecuteCommandError (declared in TDAEConnection)
Fires when exception is detected during command execution
property OnExecuteCommandError: TDAExecuteCommandErrorEvent read write
delegate: procedure OnExecuteCommandError(const Sender: IDASQLCommand; ActualSQL: string; Error: Exception)
OnOpenDatasetError (declared in TDAEConnection)
Fired if error was occured duting opening of dataset
property OnOpenDatasetError: TDAOpenDatasetErrorEvent read write
delegate: procedure OnOpenDatasetError(const Sender: IDADataset; ActualSQL: string; Error: Exception)
- Data Abstract Connections (Delphi)
- Microsoft SQL Server
- Connect via SDAC (Data Abstract)
- TDAEConnection