BaseConnection
Overview
The BaseConnection class implements the IAbstractConnection interface. Instances of this class are returned by the ConnectionManager component and are used by Data Abstract to access the underlying database without need to perform direct calls to the ADO.NET interfaces.
Implemented methods and properties of the IAbstractConnection interface allow to work with transactions, create new data readers, execute commands etc.
Location
- Reference: RemObjects.DataAbstract.Server.dll
- Namespace: RemObjects.DataAbstract.Server
- Platforms: .NET Core, .NET Framework, .NET Standard
constructor (String)
Creates a new instance of the BaseConnection class and sets its Name property.
constructor(name: String)
BaseConnection(String name)
init(_ name: String)
Sub New(name As String)
Parameters:
- name: Connection name
constructor (String, String)
Creates a new instance of the BaseConnection class and sets its Name and ConnectionString properties.
constructor(name: String; connectionString: String)
BaseConnection(String name, String connectionString)
init(_ name: String, _ connectionString: String)
Sub New(name As String, connectionString As String)
Parameters:
- name: Connection name
- connectionString: Connection String
constructor (String, String, Boolean)
Creates a new instance of the BaseConnection class and sets its Name and ConnectionString properties.
Depending on the value of the connect flag the connection being created can be immediately opened.
constructor(name: String; connectionString: String; connect: Boolean)
BaseConnection(String name, String connectionString, Boolean connect)
init(_ name: String, _ connectionString: String, _ connect: Boolean)
Sub New(name As String, connectionString As String, connect As Boolean)
Parameters:
- name: Connection name
- connectionString: Connection String
- connect: A flag indicating whether the connection should be opened immediately
ActualConnection
property ActualConnection: IDbConnection read;
IDbConnection ActualConnection { get; }
var ActualConnection: IDbConnection { get{} }
ReadOnly Property ActualConnection() As IDbConnection
BeginTransaction
method BeginTransaction: Int32
Int32 BeginTransaction()
func BeginTransaction() -> Int32
Function BeginTransaction() As Int32
BeginTransaction (IsolationLevel): Int32
method BeginTransaction(isolationLevel: IsolationLevel): Int32
Int32 BeginTransaction(IsolationLevel isolationLevel)
func BeginTransaction(_ isolationLevel: IsolationLevel) -> Int32
Function BeginTransaction(isolationLevel As IsolationLevel) As Int32
Parameters:
- isolationLevel:
CheckConnected protected
method CheckConnected(requireConnection: Boolean)
void CheckConnected(Boolean requireConnection)
func CheckConnected(_ requireConnection: Boolean)
Sub CheckConnected(requireConnection As Boolean)
Parameters:
- requireConnection:
Close
Closes connection to the underlying database.
method Close
void Close()
func Close()
Sub Close()
CommandTimeout
property CommandTimeout: Int32 read write;
Int32 CommandTimeout { get; set; }
var CommandTimeout: Int32 { get{} set{} }
Property CommandTimeout() As Int32
CommitTransaction
method CommitTransaction
void CommitTransaction()
func CommitTransaction()
Sub CommitTransaction()
Connected
property Connected: Boolean read write;
Boolean Connected { get; set; }
var Connected: Boolean { get{} set{} }
Property Connected() As Boolean
ConnectionString
property ConnectionString: String read write;
String ConnectionString { get; set; }
var ConnectionString: String { get{} set{} }
Property ConnectionString() As String
ConnectionType
property ConnectionType: String read write;
String ConnectionType { get; set; }
var ConnectionType: String { get{} set{} }
Property ConnectionType() As String
CreateCommand protected
method CreateCommand: IDbCommand
IDbCommand CreateCommand()
func CreateCommand() -> IDbCommand
Function CreateCommand() As IDbCommand
CreateCommandBuilder protected
method CreateCommandBuilder: Object
Object CreateCommandBuilder()
func CreateCommandBuilder() -> Object
Function CreateCommandBuilder() As Object
CreateConnection protected
method CreateConnection: IDbConnection
IDbConnection CreateConnection()
func CreateConnection() -> IDbConnection
Function CreateConnection() As IDbConnection
CurrentTransaction
property CurrentTransaction: IDbTransaction read;
IDbTransaction CurrentTransaction { get; }
var CurrentTransaction: IDbTransaction { get{} }
ReadOnly Property CurrentTransaction() As IDbTransaction
CustomMacroHandler
property CustomMacroHandler: SqlMacroCallback read write;
SqlMacroCallback CustomMacroHandler { get; set; }
var CustomMacroHandler: SqlMacroCallback { get{} set{} }
Property CustomMacroHandler() As SqlMacroCallback
DatabaseProfile
property DatabaseProfile: DatabaseProfile read;
DatabaseProfile DatabaseProfile { get; }
var DatabaseProfile: DatabaseProfile { get{} }
ReadOnly Property DatabaseProfile() As DatabaseProfile
DataProviderInfo
property DataProviderInfo: DataProviderInfo read;
DataProviderInfo DataProviderInfo { get; }
var DataProviderInfo: DataProviderInfo { get{} }
ReadOnly Property DataProviderInfo() As DataProviderInfo
DataProviderParams
property DataProviderParams: IDictionary<String, String> read;
IDictionary<String, String> DataProviderParams { get; }
var DataProviderParams: IDictionary<String, String> { get{} }
ReadOnly Property DataProviderParams() As IDictionary<String, String>
Dispose
method Dispose
void Dispose()
func Dispose()
Sub Dispose()
DriverName
property DriverName: String read;
String DriverName { get; }
var DriverName: String { get{} }
ReadOnly Property DriverName() As String
FetchObjectNames protected
method FetchObjectNames(sql: String): List<String>
List<String> FetchObjectNames(String sql)
func FetchObjectNames(_ sql: String) -> List<String>
Function FetchObjectNames(sql As String) As List<String>
Parameters:
- sql:
GetCommandParams
method GetCommandParams(commandText: String; isStoredProcedureNameProvided: Boolean): SchemaParameterCollection
SchemaParameterCollection GetCommandParams(String commandText, Boolean isStoredProcedureNameProvided)
func GetCommandParams(_ commandText: String, _ isStoredProcedureNameProvided: Boolean) -> SchemaParameterCollection
Function GetCommandParams(commandText As String, isStoredProcedureNameProvided As Boolean) As SchemaParameterCollection
Parameters:
- commandText:
- isStoredProcedureNameProvided:
GetDatabaseName protected
method GetDatabaseName: String
String GetDatabaseName()
func GetDatabaseName() -> String
Function GetDatabaseName() As String
GetDatabaseNames
method GetDatabaseNames: List<String>
List<String> GetDatabaseNames()
func GetDatabaseNames() -> List<String>
Function GetDatabaseNames() As List<String>
GetForeignKeys
method GetForeignKeys: SchemaRelationshipCollection
SchemaRelationshipCollection GetForeignKeys()
func GetForeignKeys() -> SchemaRelationshipCollection
Function GetForeignKeys() As SchemaRelationshipCollection
GetGeneratorNames
method GetGeneratorNames: List<String>
List<String> GetGeneratorNames()
func GetGeneratorNames() -> List<String>
Function GetGeneratorNames() As List<String>
GetSQLCommandParams protected
method GetSQLCommandParams(sql: String): SchemaParameterCollection
SchemaParameterCollection GetSQLCommandParams(String sql)
func GetSQLCommandParams(_ sql: String) -> SchemaParameterCollection
Function GetSQLCommandParams(sql As String) As SchemaParameterCollection
Parameters:
- sql:
GetStoredProcedureNames
method GetStoredProcedureNames: List<String>
List<String> GetStoredProcedureNames()
func GetStoredProcedureNames() -> List<String>
Function GetStoredProcedureNames() As List<String>
GetStoredProcedureParams protected
method GetStoredProcedureParams(procedureName: String): SchemaParameterCollection
SchemaParameterCollection GetStoredProcedureParams(String procedureName)
func GetStoredProcedureParams(_ procedureName: String) -> SchemaParameterCollection
Function GetStoredProcedureParams(procedureName As String) As SchemaParameterCollection
Parameters:
- procedureName:
GetTableFields
method GetTableFields(tableText: String; isTableNameProvided: Boolean; parameters: SchemaParameterCollection): SchemaFieldCollection
SchemaFieldCollection GetTableFields(String tableText, Boolean isTableNameProvided, SchemaParameterCollection parameters)
func GetTableFields(_ tableText: String, _ isTableNameProvided: Boolean, _ parameters: SchemaParameterCollection) -> SchemaFieldCollection
Function GetTableFields(tableText As String, isTableNameProvided As Boolean, parameters As SchemaParameterCollection) As SchemaFieldCollection
Parameters:
- tableText:
- isTableNameProvided:
- parameters:
GetTableNames
method GetTableNames: List<String>
List<String> GetTableNames()
func GetTableNames() -> List<String>
Function GetTableNames() As List<String>
GetViewNames
method GetViewNames: List<String>
List<String> GetViewNames()
func GetViewNames() -> List<String>
Function GetViewNames() As List<String>
InTransaction
property InTransaction: Boolean read;
Boolean InTransaction { get; }
var InTransaction: Boolean { get{} }
ReadOnly Property InTransaction() As Boolean
LastUsed
property LastUsed: DateTime read write;
DateTime LastUsed { get; set; }
var LastUsed: DateTime { get{} set{} }
Property LastUsed() As DateTime
Name
property Name: String read;
String Name { get; }
var Name: String { get{} }
ReadOnly Property Name() As String
NewCommand (String, CommandType): IDbCommand
method NewCommand(sql: String; commandType: CommandType := 1): IDbCommand
IDbCommand NewCommand(String sql, CommandType commandType = 1)
func NewCommand(_ sql: String, _ commandType: CommandType = 1) -> IDbCommand
Function NewCommand(sql As String, commandType As CommandType = 1) As IDbCommand
Parameters:
- sql:
- commandType:
NewCommand (String, CommandType, SchemaParameterCollection, String, String): IDbCommand
method NewCommand(sql: String; commandType: CommandType; parameters: SchemaParameterCollection; dynamicWhere: String; orderBy: String := nil): IDbCommand
IDbCommand NewCommand(String sql, CommandType commandType, SchemaParameterCollection parameters, String dynamicWhere, String orderBy = null)
func NewCommand(_ sql: String, _ commandType: CommandType, _ parameters: SchemaParameterCollection, _ dynamicWhere: String, _ orderBy: String = nil) -> IDbCommand
Function NewCommand(sql As String, commandType As CommandType, parameters As SchemaParameterCollection, dynamicWhere As String, orderBy As String = Nothing) As IDbCommand
Parameters:
- sql:
- commandType:
- parameters:
- dynamicWhere:
- orderBy:
NewDataTable (String, array of DbParameter, String, Boolean, Boolean): DataTable
method NewDataTable(sql: String; parameters: array of DbParameter; tableName: String; fillData: Boolean := true; fillSchema: Boolean := true): DataTable
DataTable NewDataTable(String sql, DbParameter[] parameters, String tableName, Boolean fillData = true, Boolean fillSchema = true)
func NewDataTable(_ sql: String, _ parameters: DbParameter..., _ tableName: String, _ fillData: Boolean = true, _ fillSchema: Boolean = true) -> DataTable
Function NewDataTable(sql As String, parameters As DbParameter(), tableName As String, fillData As Boolean = true, fillSchema As Boolean = true) As DataTable
Parameters:
- sql:
- parameters:
- tableName:
- fillData:
- fillSchema:
NewDataTable (String, String, Boolean, Boolean): DataTable
method NewDataTable(sql: String; tableName: String; fillData: Boolean := true; fillSchema: Boolean := true): DataTable
DataTable NewDataTable(String sql, String tableName, Boolean fillData = true, Boolean fillSchema = true)
func NewDataTable(_ sql: String, _ tableName: String, _ fillData: Boolean = true, _ fillSchema: Boolean = true) -> DataTable
Function NewDataTable(sql As String, tableName As String, fillData As Boolean = true, fillSchema As Boolean = true) As DataTable
Parameters:
- sql:
- tableName:
- fillData:
- fillSchema:
Open
Opens connection to the underlying database.
method Open
void Open()
func Open()
Sub Open()
Open (String, String)
method Open(userId: String; password: String)
void Open(String userId, String password)
func Open(_ userId: String, _ password: String)
Sub Open(userId As String, password As String)
Parameters:
- userId:
- password:
ParseConnectionString
method ParseConnectionString(connectionString: String)
void ParseConnectionString(String connectionString)
func ParseConnectionString(_ connectionString: String)
Sub ParseConnectionString(connectionString As String)
Parameters:
- connectionString:
Password
property Password: String read write;
String Password { get; set; }
var Password: String { get{} set{} }
Property Password() As String
RearrangeCommandParameters
method RearrangeCommandParameters(command: IDbCommand)
void RearrangeCommandParameters(IDbCommand command)
func RearrangeCommandParameters(_ command: IDbCommand)
Sub RearrangeCommandParameters(command As IDbCommand)
Parameters:
- command:
RollbackTransaction
method RollbackTransaction
void RollbackTransaction()
func RollbackTransaction()
Sub RollbackTransaction()
SetParameterValue
Sets the value of the provided command parameter.
While the IDataParameter interface allows to set the parameter value directly, this method provides additional logic needed to workaround the Mono bug related to the MS SQL parameters handling.
method SetParameterValue(parameter: IDataParameter; value: Object)
void SetParameterValue(IDataParameter parameter, Object value)
func SetParameterValue(_ parameter: IDataParameter, _ value: Object)
Sub SetParameterValue(parameter As IDataParameter, value As Object)
Parameters:
- parameter: Command parameter
- value: Intended parameter value
TransactionCount
property TransactionCount: Int32 read;
Int32 TransactionCount { get; }
var TransactionCount: Int32 { get{} }
ReadOnly Property TransactionCount() As Int32
TranslateParameterizedSql
method TranslateParameterizedSql(sql: String): String
String TranslateParameterizedSql(String sql)
func TranslateParameterizedSql(_ sql: String) -> String
Function TranslateParameterizedSql(sql As String) As String
Parameters:
- sql:
UserID
property UserID: String read write;
String UserID { get; set; }
var UserID: String { get{} set{} }
Property UserID() As String
ActualConnection
property ActualConnection: IDbConnection read;
IDbConnection ActualConnection { get; }
var ActualConnection: IDbConnection { get{} }
ReadOnly Property ActualConnection() As IDbConnection
CommandTimeout
property CommandTimeout: Int32 read write;
Int32 CommandTimeout { get; set; }
var CommandTimeout: Int32 { get{} set{} }
Property CommandTimeout() As Int32
Connected
property Connected: Boolean read write;
Boolean Connected { get; set; }
var Connected: Boolean { get{} set{} }
Property Connected() As Boolean
ConnectionString
property ConnectionString: String read write;
String ConnectionString { get; set; }
var ConnectionString: String { get{} set{} }
Property ConnectionString() As String
ConnectionType
property ConnectionType: String read write;
String ConnectionType { get; set; }
var ConnectionType: String { get{} set{} }
Property ConnectionType() As String
CurrentTransaction
property CurrentTransaction: IDbTransaction read;
IDbTransaction CurrentTransaction { get; }
var CurrentTransaction: IDbTransaction { get{} }
ReadOnly Property CurrentTransaction() As IDbTransaction
CustomMacroHandler
property CustomMacroHandler: SqlMacroCallback read write;
SqlMacroCallback CustomMacroHandler { get; set; }
var CustomMacroHandler: SqlMacroCallback { get{} set{} }
Property CustomMacroHandler() As SqlMacroCallback
DatabaseProfile
property DatabaseProfile: DatabaseProfile read;
DatabaseProfile DatabaseProfile { get; }
var DatabaseProfile: DatabaseProfile { get{} }
ReadOnly Property DatabaseProfile() As DatabaseProfile
DataProviderInfo
property DataProviderInfo: DataProviderInfo read;
DataProviderInfo DataProviderInfo { get; }
var DataProviderInfo: DataProviderInfo { get{} }
ReadOnly Property DataProviderInfo() As DataProviderInfo
DataProviderParams
property DataProviderParams: IDictionary<String, String> read;
IDictionary<String, String> DataProviderParams { get; }
var DataProviderParams: IDictionary<String, String> { get{} }
ReadOnly Property DataProviderParams() As IDictionary<String, String>
DriverName
property DriverName: String read;
String DriverName { get; }
var DriverName: String { get{} }
ReadOnly Property DriverName() As String
InTransaction
property InTransaction: Boolean read;
Boolean InTransaction { get; }
var InTransaction: Boolean { get{} }
ReadOnly Property InTransaction() As Boolean
LastUsed
property LastUsed: DateTime read write;
DateTime LastUsed { get; set; }
var LastUsed: DateTime { get{} set{} }
Property LastUsed() As DateTime
Name
property Name: String read;
String Name { get; }
var Name: String { get{} }
ReadOnly Property Name() As String
Password
property Password: String read write;
String Password { get; set; }
var Password: String { get{} set{} }
Property Password() As String
TransactionCount
property TransactionCount: Int32 read;
Int32 TransactionCount { get; }
var TransactionCount: Int32 { get{} }
ReadOnly Property TransactionCount() As Int32
UserID
property UserID: String read write;
String UserID { get; set; }
var UserID: String { get{} set{} }
Property UserID() As String
constructor (String)
Creates a new instance of the BaseConnection class and sets its Name property.
constructor(name: String)
BaseConnection(String name)
init(_ name: String)
Sub New(name As String)
Parameters:
- name: Connection name
constructor (String, String)
Creates a new instance of the BaseConnection class and sets its Name and ConnectionString properties.
constructor(name: String; connectionString: String)
BaseConnection(String name, String connectionString)
init(_ name: String, _ connectionString: String)
Sub New(name As String, connectionString As String)
Parameters:
- name: Connection name
- connectionString: Connection String
constructor (String, String, Boolean)
Creates a new instance of the BaseConnection class and sets its Name and ConnectionString properties.
Depending on the value of the connect flag the connection being created can be immediately opened.
constructor(name: String; connectionString: String; connect: Boolean)
BaseConnection(String name, String connectionString, Boolean connect)
init(_ name: String, _ connectionString: String, _ connect: Boolean)
Sub New(name As String, connectionString As String, connect As Boolean)
Parameters:
- name: Connection name
- connectionString: Connection String
- connect: A flag indicating whether the connection should be opened immediately
BeginTransaction
method BeginTransaction: Int32
Int32 BeginTransaction()
func BeginTransaction() -> Int32
Function BeginTransaction() As Int32
BeginTransaction (IsolationLevel): Int32
method BeginTransaction(isolationLevel: IsolationLevel): Int32
Int32 BeginTransaction(IsolationLevel isolationLevel)
func BeginTransaction(_ isolationLevel: IsolationLevel) -> Int32
Function BeginTransaction(isolationLevel As IsolationLevel) As Int32
Parameters:
- isolationLevel:
CheckConnected protected
method CheckConnected(requireConnection: Boolean)
void CheckConnected(Boolean requireConnection)
func CheckConnected(_ requireConnection: Boolean)
Sub CheckConnected(requireConnection As Boolean)
Parameters:
- requireConnection:
Close
Closes connection to the underlying database.
method Close
void Close()
func Close()
Sub Close()
CommitTransaction
method CommitTransaction
void CommitTransaction()
func CommitTransaction()
Sub CommitTransaction()
CreateCommand protected
method CreateCommand: IDbCommand
IDbCommand CreateCommand()
func CreateCommand() -> IDbCommand
Function CreateCommand() As IDbCommand
CreateCommandBuilder protected
method CreateCommandBuilder: Object
Object CreateCommandBuilder()
func CreateCommandBuilder() -> Object
Function CreateCommandBuilder() As Object
CreateConnection protected
method CreateConnection: IDbConnection
IDbConnection CreateConnection()
func CreateConnection() -> IDbConnection
Function CreateConnection() As IDbConnection
Dispose
method Dispose
void Dispose()
func Dispose()
Sub Dispose()
FetchObjectNames protected
method FetchObjectNames(sql: String): List<String>
List<String> FetchObjectNames(String sql)
func FetchObjectNames(_ sql: String) -> List<String>
Function FetchObjectNames(sql As String) As List<String>
Parameters:
- sql:
GetCommandParams
method GetCommandParams(commandText: String; isStoredProcedureNameProvided: Boolean): SchemaParameterCollection
SchemaParameterCollection GetCommandParams(String commandText, Boolean isStoredProcedureNameProvided)
func GetCommandParams(_ commandText: String, _ isStoredProcedureNameProvided: Boolean) -> SchemaParameterCollection
Function GetCommandParams(commandText As String, isStoredProcedureNameProvided As Boolean) As SchemaParameterCollection
Parameters:
- commandText:
- isStoredProcedureNameProvided:
GetDatabaseName protected
method GetDatabaseName: String
String GetDatabaseName()
func GetDatabaseName() -> String
Function GetDatabaseName() As String
GetDatabaseNames
method GetDatabaseNames: List<String>
List<String> GetDatabaseNames()
func GetDatabaseNames() -> List<String>
Function GetDatabaseNames() As List<String>
GetForeignKeys
method GetForeignKeys: SchemaRelationshipCollection
SchemaRelationshipCollection GetForeignKeys()
func GetForeignKeys() -> SchemaRelationshipCollection
Function GetForeignKeys() As SchemaRelationshipCollection
GetGeneratorNames
method GetGeneratorNames: List<String>
List<String> GetGeneratorNames()
func GetGeneratorNames() -> List<String>
Function GetGeneratorNames() As List<String>
GetSQLCommandParams protected
method GetSQLCommandParams(sql: String): SchemaParameterCollection
SchemaParameterCollection GetSQLCommandParams(String sql)
func GetSQLCommandParams(_ sql: String) -> SchemaParameterCollection
Function GetSQLCommandParams(sql As String) As SchemaParameterCollection
Parameters:
- sql:
GetStoredProcedureNames
method GetStoredProcedureNames: List<String>
List<String> GetStoredProcedureNames()
func GetStoredProcedureNames() -> List<String>
Function GetStoredProcedureNames() As List<String>
GetStoredProcedureParams protected
method GetStoredProcedureParams(procedureName: String): SchemaParameterCollection
SchemaParameterCollection GetStoredProcedureParams(String procedureName)
func GetStoredProcedureParams(_ procedureName: String) -> SchemaParameterCollection
Function GetStoredProcedureParams(procedureName As String) As SchemaParameterCollection
Parameters:
- procedureName:
GetTableFields
method GetTableFields(tableText: String; isTableNameProvided: Boolean; parameters: SchemaParameterCollection): SchemaFieldCollection
SchemaFieldCollection GetTableFields(String tableText, Boolean isTableNameProvided, SchemaParameterCollection parameters)
func GetTableFields(_ tableText: String, _ isTableNameProvided: Boolean, _ parameters: SchemaParameterCollection) -> SchemaFieldCollection
Function GetTableFields(tableText As String, isTableNameProvided As Boolean, parameters As SchemaParameterCollection) As SchemaFieldCollection
Parameters:
- tableText:
- isTableNameProvided:
- parameters:
GetTableNames
method GetTableNames: List<String>
List<String> GetTableNames()
func GetTableNames() -> List<String>
Function GetTableNames() As List<String>
GetViewNames
method GetViewNames: List<String>
List<String> GetViewNames()
func GetViewNames() -> List<String>
Function GetViewNames() As List<String>
NewCommand (String, CommandType): IDbCommand
method NewCommand(sql: String; commandType: CommandType := 1): IDbCommand
IDbCommand NewCommand(String sql, CommandType commandType = 1)
func NewCommand(_ sql: String, _ commandType: CommandType = 1) -> IDbCommand
Function NewCommand(sql As String, commandType As CommandType = 1) As IDbCommand
Parameters:
- sql:
- commandType:
NewCommand (String, CommandType, SchemaParameterCollection, String, String): IDbCommand
method NewCommand(sql: String; commandType: CommandType; parameters: SchemaParameterCollection; dynamicWhere: String; orderBy: String := nil): IDbCommand
IDbCommand NewCommand(String sql, CommandType commandType, SchemaParameterCollection parameters, String dynamicWhere, String orderBy = null)
func NewCommand(_ sql: String, _ commandType: CommandType, _ parameters: SchemaParameterCollection, _ dynamicWhere: String, _ orderBy: String = nil) -> IDbCommand
Function NewCommand(sql As String, commandType As CommandType, parameters As SchemaParameterCollection, dynamicWhere As String, orderBy As String = Nothing) As IDbCommand
Parameters:
- sql:
- commandType:
- parameters:
- dynamicWhere:
- orderBy:
NewDataTable (String, array of DbParameter, String, Boolean, Boolean): DataTable
method NewDataTable(sql: String; parameters: array of DbParameter; tableName: String; fillData: Boolean := true; fillSchema: Boolean := true): DataTable
DataTable NewDataTable(String sql, DbParameter[] parameters, String tableName, Boolean fillData = true, Boolean fillSchema = true)
func NewDataTable(_ sql: String, _ parameters: DbParameter..., _ tableName: String, _ fillData: Boolean = true, _ fillSchema: Boolean = true) -> DataTable
Function NewDataTable(sql As String, parameters As DbParameter(), tableName As String, fillData As Boolean = true, fillSchema As Boolean = true) As DataTable
Parameters:
- sql:
- parameters:
- tableName:
- fillData:
- fillSchema:
NewDataTable (String, String, Boolean, Boolean): DataTable
method NewDataTable(sql: String; tableName: String; fillData: Boolean := true; fillSchema: Boolean := true): DataTable
DataTable NewDataTable(String sql, String tableName, Boolean fillData = true, Boolean fillSchema = true)
func NewDataTable(_ sql: String, _ tableName: String, _ fillData: Boolean = true, _ fillSchema: Boolean = true) -> DataTable
Function NewDataTable(sql As String, tableName As String, fillData As Boolean = true, fillSchema As Boolean = true) As DataTable
Parameters:
- sql:
- tableName:
- fillData:
- fillSchema:
Open
Opens connection to the underlying database.
method Open
void Open()
func Open()
Sub Open()
Open (String, String)
method Open(userId: String; password: String)
void Open(String userId, String password)
func Open(_ userId: String, _ password: String)
Sub Open(userId As String, password As String)
Parameters:
- userId:
- password:
ParseConnectionString
method ParseConnectionString(connectionString: String)
void ParseConnectionString(String connectionString)
func ParseConnectionString(_ connectionString: String)
Sub ParseConnectionString(connectionString As String)
Parameters:
- connectionString:
RearrangeCommandParameters
method RearrangeCommandParameters(command: IDbCommand)
void RearrangeCommandParameters(IDbCommand command)
func RearrangeCommandParameters(_ command: IDbCommand)
Sub RearrangeCommandParameters(command As IDbCommand)
Parameters:
- command:
RollbackTransaction
method RollbackTransaction
void RollbackTransaction()
func RollbackTransaction()
Sub RollbackTransaction()
SetParameterValue
Sets the value of the provided command parameter.
While the IDataParameter interface allows to set the parameter value directly, this method provides additional logic needed to workaround the Mono bug related to the MS SQL parameters handling.
method SetParameterValue(parameter: IDataParameter; value: Object)
void SetParameterValue(IDataParameter parameter, Object value)
func SetParameterValue(_ parameter: IDataParameter, _ value: Object)
Sub SetParameterValue(parameter As IDataParameter, value As Object)
Parameters:
- parameter: Command parameter
- value: Intended parameter value
TranslateParameterizedSql
method TranslateParameterizedSql(sql: String): String
String TranslateParameterizedSql(String sql)
func TranslateParameterizedSql(_ sql: String) -> String
Function TranslateParameterizedSql(sql As String) As String
Parameters:
- sql: