Click or drag to resize
DataConnection Class
Represents SQL Server data connection.
Inheritance Hierarchy

Namespace: CMS.DataProviderSQL
Assembly: CMS.DataProviderSQL (in CMS.DataProviderSQL.dll) Version: 8.2.23
Syntax
C#
public class DataConnection : AbstractDataConnection

The DataConnection type exposes the following members.

Methods
  NameDescription
Protected methodAddParameters
Adds the given parameters to the SQL command
(Inherited from AbstractDataConnection.)
Public methodBeginTransaction
Begins a new transaction.
(Inherited from AbstractDataConnection.)
Public methodBeginTransaction(IsolationLevel)
Begins a new transaction.
(Inherited from AbstractDataConnection.)
Public methodBulkInsert
Performs a bulk insert of the data into a target database table
(Overrides AbstractDataConnectionBulkInsert(DataTable, String, BulkInsertSettings).)
Public methodClose
Closes connection to the database.
(Inherited from AbstractDataConnection.)
Public methodCommitTransaction
Commits current transaction.
(Inherited from AbstractDataConnection.)
Protected methodCreateCommand
Creates a new SQL command
(Overrides AbstractDataConnectionCreateCommand(String).)
Protected methodCreateDataAdapter
Creates a data adapter
(Overrides AbstractDataConnectionCreateDataAdapter.)
Protected methodCreateNativeConnection
Creates a new native connection
(Overrides AbstractDataConnectionCreateNativeConnection.)
Protected methodCreateParameter(DataParameter)
Creates a SQL parameter from the given data parameter
(Inherited from AbstractDataConnection.)
Protected methodCreateParameter(String, Object)
Creates a new command parameter
(Overrides AbstractDataConnectionCreateParameter(String, Object).)
Public methodDispose
Disposes the connection object.
(Inherited from AbstractDataConnection.)
Public methodExecuteNonQuery
Returns result of the query.
(Inherited from AbstractDataConnection.)
Public methodExecuteQuery
Returns result of the query.
(Inherited from AbstractDataConnection.)
Public methodExecuteReader
Returns result of the query as a Data reader. Keeps the connection open.
(Inherited from AbstractDataConnection.)
Public methodExecuteScalar
Returns a single value result of the query.
(Inherited from AbstractDataConnection.)
Public methodGetExecutingConnection
Gets the connection that executes the given query
(Inherited from AbstractDataConnection.)
Public methodGetNestedConnection
Gets the nested connection with the given connection string
(Inherited from AbstractDataConnection.)
Public methodGetXmlSchema
Returns XML schema for specified table.
(Inherited from AbstractDataConnection.)
Protected methodHandleDbError
Handles the database error. Returns false, if the error was not handled
(Overrides AbstractDataConnectionHandleDbError(String, DbException).)
Protected methodHandleError
Handles the error. Returns false, if the error was not handled
(Inherited from AbstractDataConnection.)
Protected methodCheckThreadSafety
Checks the thread safety of current operation.
(Inherited from AbstractDataConnection.)
Public methodIsOpen
Returns true if connection to the database is open.
(Inherited from AbstractDataConnection.)
Public methodIsTransaction
Indicates if transaction is running.
(Inherited from AbstractDataConnection.)
Protected methodLoadDefaultConnectionString
Loads the default connection string
(Inherited from AbstractDataConnection.)
Public methodLogConnectionOperation
Logs the connection operation to the query log.
(Inherited from AbstractDataConnection.)
Public methodNativeConnectionExists
Returns true if the native connection exists.
(Inherited from AbstractDataConnection.)
Public methodNativeDBConnectionExists
Returns true if the native connection exists.
(Inherited from AbstractDataConnection.)
Public methodOpen
Opens connection to the database.
(Inherited from AbstractDataConnection.)
Protected methodPrepareCommand
Prepares the SQL command for the query.
(Inherited from AbstractDataConnection.)
Public methodRollbackTransaction
Rollbacks current transaction.
(Inherited from AbstractDataConnection.)
Protected methodSetParameterType
Sets the parameter type to a destination type
(Inherited from AbstractDataConnection.)
Protected methodValidateTransaction
Validates the transaction
(Inherited from AbstractDataConnection.)
Top
Extension Methods
  NameDescription
Public Extension MethodAsValue
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.)
Public Extension MethodGetAPIString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodGetString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodToBoolean
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDateTime
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDouble
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToGuid
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToInteger
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToString
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.)
Top
Fields
  NameDescription
Protected fieldmAdvancedSettings
Advanced settings.
(Inherited from AbstractDataConnection.)
Protected fieldmCommandTimeout
Command timeout.
(Inherited from AbstractDataConnection.)
Protected fieldmConnectionCreated
If true, the connection was created from this object
(Inherited from AbstractDataConnection.)
Protected fieldmConnectionString
Connection string for specific provider.
(Inherited from AbstractDataConnection.)
Protected fieldmConnectionStringName
Connection string name
(Inherited from AbstractDataConnection.)
Protected fieldmLastError
Last connection error
(Inherited from AbstractDataConnection.)
Protected fieldmLocalTransaction
SqlTransaction object.
(Inherited from AbstractDataConnection.)
Protected fieldmNativeConnection
Native connection object. It depends on provider type.
(Inherited from AbstractDataConnection.)
Protected fieldmNestedConnections
Nested connections indexed by the connection string [connectionString -> IDbConnection]
(Inherited from AbstractDataConnection.)
Protected fieldmNestedConnectionsList
List of nested connections
(Inherited from AbstractDataConnection.)
Protected fieldmNestedOpenConnections
List of nested connections that were automatically opened
(Inherited from AbstractDataConnection.)
Protected fieldmNestedOpenTransactions
List of nested connections that were automatically opened with transaction
(Inherited from AbstractDataConnection.)
Protected fieldmOriginalThreadID
Original thread ID of the connection.
(Inherited from AbstractDataConnection.)
Protected fieldmUseScopeConnection
If true, the connection uses the scope connection
(Inherited from AbstractDataConnection.)
Top
Properties
  NameDescription
Public propertyAdvancedSettings
Advanced settings.
(Inherited from AbstractDataConnection.)
Public propertyCommandTimeout
Command timeout.
(Inherited from AbstractDataConnection.)
Public propertyConnectionCreated
If true, some connection was used
(Inherited from AbstractDataConnection.)
Public propertyConnectionGUID
Connection GUID
(Inherited from AbstractDataConnection.)
Public propertyConnectionString
Connection string for specific provider.
(Inherited from AbstractDataConnection.)
Public propertyConnectionStringName
Connection string name
(Inherited from AbstractDataConnection.)
Public propertyDisableConnectionDebug
If true, the debug is disabled on this connection
(Inherited from AbstractDataConnection.)
Public propertyDisableQueryDebug
If true, the debug of queries is disabled on this connection
(Inherited from AbstractDataConnection.)
Public propertyKeepOpen
If true, the connection stays open even if close is requested.
(Inherited from AbstractDataConnection.)
Protected propertyLocalAdvancedSettings
Local advanced settings.
(Inherited from AbstractDataConnection.)
Protected propertyLocalKeepOpen
If true, the connection stays open even if close is requested.
(Inherited from AbstractDataConnection.)
Protected propertyLocalTransaction
Transaction object of local instance.
(Inherited from AbstractDataConnection.)
Public propertyNativeConnection
Native connection object. It depends on provider type.
(Inherited from AbstractDataConnection.)
Protected propertyNativeDBConnection
Native connection object. It depends on provider type.
(Inherited from AbstractDataConnection.)
Public propertyTransaction
Transaction object.
(Inherited from AbstractDataConnection.)
Public propertyUseScopeConnection
If true, the connection uses the scope connection
(Inherited from AbstractDataConnection.)
Top
See Also