Click or drag to resize
GeneralConnection Class
Represents a general database connection.
Inheritance Hierarchy
SystemObject
  CMS.DataEngineGeneralConnection

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 8.2.23
Syntax
C#
[SerializableAttribute]
public class GeneralConnection : ISerializable, 
	IDataConnection, IDisposable

The GeneralConnection type exposes the following members.

Constructors
  NameDescription
Protected methodGeneralConnection(String)
Constructor.
Public methodGeneralConnection(SerializationInfo, StreamingContext)
Constructor for deserialization.
Top
Methods
  NameDescription
Public methodBulkInsert
Performs a bulk insert of the data into a target database table
Public methodClose
Closes the connection.
Public methodDispose
Disposes the connection
Public methodExecuteNonQuery(QueryParameters)
Runs the query.
Public methodExecuteNonQuery(String, QueryDataParameters, QueryMacros) Obsolete.
Executes query and returns the number of affected rows.
Public methodExecuteNonQuery(String, QueryDataParameters, QueryTypeEnum, Boolean) Obsolete.
Runs the query.
Public methodExecuteQuery(QueryParameters)
Executes query and returns result as a dataset.
Public methodExecuteQuery(QueryParameters, Int32)
Executes query and returns result as a DataSet. Returns the total number of result items.
Public methodExecuteQuery(String, QueryDataParameters, QueryMacros) Obsolete.
Executes query and returns result as a dataset.
Public methodExecuteQuery(QueryInfo, QueryDataParameters, QueryMacros) Obsolete.
Executes query and returns result as a dataset.
Public methodExecuteQuery(String, QueryDataParameters, QueryTypeEnum, Boolean) Obsolete.
Runs the query.
Public methodExecuteQuery(String, QueryDataParameters, QueryMacros, Int32, Int32, Int32) Obsolete.
Executes query and returns result as a dataset.
Public methodExecuteReader(QueryParameters, CommandBehavior)
Runs the query and returns result as Data reader. Keeps the connection open.
Public methodExecuteReader(String, QueryDataParameters, QueryMacros, CommandBehavior) Obsolete.
Executes query and returns result as a data reader. Keeps the connection open.
Public methodExecuteReader(String, QueryDataParameters, QueryTypeEnum, CommandBehavior) Obsolete.
Runs the query and returns result as Data reader. Keeps the connection open.
Public methodExecuteReader(QueryInfo, QueryDataParameters, QueryMacros, CommandBehavior) Obsolete.
Executes query and returns result as a data reader. Keeps the connection open.
Public methodExecuteScalar(QueryParameters)
Runs the query and returns result as a single value.
Public methodExecuteScalar(String, QueryDataParameters, QueryMacros) Obsolete.
Executes query and returns result as a a single value.
Public methodExecuteScalar(String, QueryDataParameters, QueryTypeEnum, Boolean) Obsolete.
Runs the query.
Public methodGetExecutingConnection
Gets the connection that executes the given query
Public methodGetObjectData
Gets object data.
Public methodIsOpen
Returns true if the connection is open.
Public methodLogQueryEnd
Logs the end of the query processing.
Public methodLogQueryStart
Logs query start. Logs the query to the file and to current request log for debugging.
Public methodOpen
Opens the connection.
Protected methodRunQuery
Runs the query against SQL DB.
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 fieldmConnectionGuid
Connection GUID to identify the connection.
Protected fieldmDataConnection
Data connection for specific provider.
Top
Properties
  NameDescription
Public propertyAdvancedSettings
Advanced settings.
Public propertyCacheDependency
Cache dependency for the cached items.
Public propertyCacheMinutes
Cache minutes for which the selected data should be cached (only for SELECT queries).
Public propertyCommandTimeout
Command timeout.
Public propertyConnectionGuid
Connection GUID to identify the connection.
Public propertyConnectionString
Connection string for specific provider.
Public propertyDataConnection
Data connection for specific provider.
Public propertyDisableConnectionDebug
If true, the debug is disabled on this connection
Public propertyDisableQueryDebug
If true, the debug of the executed queries is disabled on this connection
Public propertyFireErrorOnExecute
If true, an error if fired on execution (for debug purposes).
Public propertyKeepOpen
If true, the connection stays open even if close is requested.
Public propertyUserID
ID of the current user.
Public propertyUseScopeConnection
If true, the connection uses the scope connection
Top
See Also