Show / Hide Table of Contents

    Class DataConnection

    Represents a connection to a database.

    Inheritance
    System.Object
    System.Data.Common.DbConnection
    DataConnection
    Implements
    System.Data.IDbConnection
    System.IDisposable
    IDataConnection
    Inherited Members
    System.Data.Common.DbConnection.BeginDbTransaction(System.Data.IsolationLevel)
    System.Data.Common.DbConnection.BeginTransaction()
    System.Data.Common.DbConnection.BeginTransaction(System.Data.IsolationLevel)
    System.Data.Common.DbConnection.CreateCommand()
    System.Data.Common.DbConnection.CreateDbCommand()
    System.Data.Common.DbConnection.OnStateChange(System.Data.StateChangeEventArgs)
    System.Data.Common.DbConnection.OpenAsync()
    System.Data.Common.DbConnection.OpenAsync(System.Threading.CancellationToken)
    System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction()
    System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction(System.Data.IsolationLevel)
    System.Data.Common.DbConnection.System.Data.IDbConnection.CreateCommand()
    System.Data.Common.DbConnection.Dispose()
    System.Data.Common.DbConnection.Dispose(System.Boolean)
    System.Data.Common.DbConnection.DataSource
    System.Data.Common.DbConnection.ServerVersion
    System.Data.Common.DbConnection.StateChange
    Namespace: Cuemon.Data
    Assembly: Cuemon.Data.dll
    Syntax
    public abstract class DataConnection : DbConnection, IDbConnection, IDisposable, IDataConnection

    Constructors

    | Improve this Doc

    DataConnection()

    Initializes a new instance of the DataConnection class.

    Declaration
    protected DataConnection()
    | Improve this Doc

    DataConnection(String)

    Initializes a new instance of the DataConnection class.

    Declaration
    protected DataConnection(string connectionString)
    Parameters
    Type Name Description
    System.String connectionString

    The connection string used to establish the connection.

    | Improve this Doc

    DataConnection(String, String, String, String, String)

    Initializes a new instance of the DataConnection class.

    Declaration
    protected DataConnection(string database, string address, string userId, string password, string networkLibrary)
    Parameters
    Type Name Description
    System.String database

    The database of the connection.

    System.String address

    The address of the connection.

    System.String userId

    The user id of the connection.

    System.String password

    The password of the connection.

    System.String networkLibrary

    The network library of the connection.

    | Improve this Doc

    DataConnection(String, String, String, String, String, TimeSpan)

    Initializes a new instance of the DataConnection class.

    Declaration
    protected DataConnection(string database, string address, string userId, string password, string networkLibrary, TimeSpan timeout)
    Parameters
    Type Name Description
    System.String database

    The database of the connection.

    System.String address

    The address of the connection.

    System.String userId

    The user id of the connection.

    System.String password

    The password of the connection.

    System.String networkLibrary

    The network library of the connection.

    System.TimeSpan timeout

    The timespan to wait of the connection to open.

    Properties

    | Improve this Doc

    Address

    Gets or sets the server address of the connection.

    Declaration
    public string Address { get; set; }
    Property Value
    Type Description
    System.String

    The server address of the connection.

    | Improve this Doc

    ConnectionString

    Gets or sets the string used to open the connection.

    Declaration
    public override string ConnectionString { get; set; }
    Property Value
    Type Description
    System.String
    Overrides
    System.Data.Common.DbConnection.ConnectionString
    | Improve this Doc

    ConnectionTimeout

    Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error. Preserved for backward compatibility.

    Declaration
    public override int ConnectionTimeout { get; }
    Property Value
    Type Description
    System.Int32

    The time (in seconds) to wait for a connection to open. The value is taken from the Timeout value, and is default 10 seconds.

    Overrides
    System.Data.Common.DbConnection.ConnectionTimeout
    | Improve this Doc

    Database

    Gets or sets the database of the connection.

    Declaration
    public override string Database { get; }
    Property Value
    Type Description
    System.String

    The database of the connection.

    Overrides
    System.Data.Common.DbConnection.Database
    | Improve this Doc

    NetworkLibrary

    Gets or sets the network library of the connection.

    Declaration
    public string NetworkLibrary { get; set; }
    Property Value
    Type Description
    System.String

    The network library of the connection.

    | Improve this Doc

    Password

    Gets or sets the password of the connection.

    Declaration
    public string Password { get; set; }
    Property Value
    Type Description
    System.String

    The password of the connection.

    | Improve this Doc

    State

    Gets the current state of the connection.

    Declaration
    public abstract override ConnectionState State { get; }
    Property Value
    Type Description
    System.Data.ConnectionState
    Overrides
    System.Data.Common.DbConnection.State
    | Improve this Doc

    Timeout

    Gets or sets the time to wait while trying to establish a connection before terminating the attempt and generating an error.

    Declaration
    public TimeSpan Timeout { get; set; }
    Property Value
    Type Description
    System.TimeSpan

    The timespan to wait for a connection to open. The default value is 10 seconds.

    | Improve this Doc

    UserId

    Gets or sets the user id of the connection.

    Declaration
    public string UserId { get; set; }
    Property Value
    Type Description
    System.String

    The user id of the connection.

    Methods

    | Improve this Doc

    ChangeDatabase(String)

    Changes the current database for an open Connection object.

    Declaration
    public abstract override void ChangeDatabase(string databaseName)
    Parameters
    Type Name Description
    System.String databaseName

    The name of the database to use in place of the current database.

    Overrides
    System.Data.Common.DbConnection.ChangeDatabase(System.String)
    | Improve this Doc

    Close()

    Closes the connection to the database.

    Declaration
    public abstract override void Close()
    Overrides
    System.Data.Common.DbConnection.Close()
    | Improve this Doc

    GetConnectionString(DbConnection)

    Renders a connection string from objects with the implemented IDataConnection interface.

    Declaration
    public static string GetConnectionString(DbConnection dataConnection)
    Parameters
    Type Name Description
    System.Data.Common.DbConnection dataConnection

    The data connection interface.

    Returns
    Type Description
    System.String

    A connection string.

    | Improve this Doc

    Open()

    Opens a database connection with the settings specified by the ConnectionString property of the provider-specific Connection object.

    Declaration
    public abstract override void Open()
    Overrides
    System.Data.Common.DbConnection.Open()
    | Improve this Doc

    ToString()

    Renders the properties of this class to a connection string (if no "manuel" connectionString has been specified). If ConfigurationElement has been set, values are derived from this object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A connection string.

    Overrides
    System.Object.ToString()

    Implements

    System.Data.IDbConnection
    System.IDisposable
    IDataConnection

    Extension Methods

    ConverterExtensions.ParseWith<TSource, TResult>(TSource, Func<TSource, TResult>)
    ConverterExtensions.ParseWith<TSource, T, TResult>(TSource, Func<TSource, T, TResult>, T)
    ConverterExtensions.ParseWith<TSource, T1, T2, TResult>(TSource, Func<TSource, T1, T2, TResult>, T1, T2)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, TResult>(TSource, Func<TSource, T1, T2, T3, TResult>, T1, T2, T3)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, TResult>(TSource, Func<TSource, T1, T2, T3, T4, TResult>, T1, T2, T3, T4)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, TResult>, T1, T2, T3, T4, T5, T6)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>, T1, T2, T3, T4, T5, T6, T7)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>, T1, T2, T3, T4, T5, T6, T7, T8)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>, T1, T2, T3, T4, T5, T6, T7, T8, T9)
    ConverterExtensions.As<TResult>(Object)
    ConverterExtensions.As<TResult>(Object, TResult)
    ConverterExtensions.As<TResult>(Object, TResult, IFormatProvider)
    DelegateUtilityExtensions.Wrap<TResult>(TResult)
    DelegateUtilityExtensions.DynamicWrap<TResult>(TResult)
    TweakerExtensions.Adjust<T>(T, Func<T, T>)
    TypeUtilityExtensions.Is<T>(Object)
    TypeUtilityExtensions.IsNot<T>(Object)
    TypeUtilityExtensions.IsNullable<T>(T)
    WrapperExtensions.UseWrapper<T>(T, Action<IDictionary<String, Object>>)
    WrapperExtensions.UseWrapper<T>(T, MemberInfo, Action<IDictionary<String, Object>>)
    EnumerableUtilityExtensions.Yield<TSource>(TSource)
    HashUtilityExtensions.ComputeHash(Object, Action<HashOptions>)
    HmacUtilityExtensions.ComputeKeyedHash(Object, Byte[], Action<KeyedHashOptions>)
    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX