dotConnect for SQL Server Documentation
Devart.Data.SqlServer Namespace / SqlConnection Class
Properties Methods Events

In This Topic
    SqlConnection Class Members
    In This Topic

    The following tables list the members exposed by SqlConnection.

    Public Constructors
     NameDescription
    Public ConstructorOverloaded. Initializes a new instance of the SqlConnection class.  
    Top
    Public Properties
     NameDescription
    Public Propertystatic (Shared in Visual Basic)  
    Public Propertystatic (Shared in Visual Basic)  
    Public PropertyOverridden. Gets or sets the string used to open a SQL Server connection.  
    Public PropertyOverridden. Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.  
    Public PropertyGets the System.ComponentModel.IContainer that contains the System.ComponentModel.Component. (Inherited from System.ComponentModel.Component)
    Public PropertyGets or sets the name of the current database or the database to be used once a connection is open.  
    Public PropertyGets or sets the name of the instance of SQL Server to which to connect.  
    Public PropertyDetermines whether to handle errors, treated as exceptions, in the InfoMessage event handler.  
    Public PropertyIndicates whether the connection is enlisted in a distributed transaction. (Inherited from Devart.Common.DbConnectionBase)
    Public PropertyDetermines whether the ConnectionLost event, which allows implicit reconnecting and reexectuting the corresponding operation, occurs after connection is lost.  
    Public PropertyGets or sets the name of the component.  
    Public PropertyGets or sets a form or other container that the SqlConnection instance belongs to.  
    Public PropertyGets or sets the user's password to connect.  
    Public PropertyOverridden. Gets a string containing the version of the instance of SQL Server to which the client is connected.  
    Public PropertyGets or sets the System.ComponentModel.ISite of the System.ComponentModel.Component. (Inherited from System.ComponentModel.Component)
    Public PropertyGets the current state of the connection.  
    Public PropertyDetermines whether to enable statistics gathering for the connection.  
    Public PropertyGets or sets the name of the user to connect.  
    Public PropertyGets a string that identifies the database client.  
    Top
    Public Methods
     NameDescription
    Public MethodStarts an asynchronous invocation of an Open method. (Inherited from Devart.Common.DbConnectionBase)
    Public MethodOverloaded. Starts a database transaction.  
    Public MethodOverridden. Changes the current database.  
    Public Methodstatic (Shared in Visual Basic)Changes the password for the user specified in the connection string.  
    Public Methodstatic (Shared in Visual Basic)Clears all pools associated with the connection.  
    Public Methodstatic (Shared in Visual Basic)Clears the pool matching ConnectionString of provided SqlConnection object.  
    Public MethodCreates a new object that is a copy of the current instance.  
    Public MethodCloses the connection to the database. This is the preferred method of closing any open connection. (Inherited from Devart.Common.DbConnectionBase)
    Public MethodCreates and returns a SqlCommand object associated with the SqlConnection.  
    Public MethodCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
    Public MethodReleases all resources used by the System.ComponentModel.Component. (Inherited from System.ComponentModel.Component)
    Public MethodEnds an asynchronous invocation of the Open method. (Inherited from Devart.Common.DbConnectionBase)
    Public MethodEnlists in the specified transaction as a distributed transaction.  
    Public MethodOverridden. Enlists in the specified transaction.  
    Public MethodRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
    Public MethodOverloaded. Returns list of metadata collections and number of restrictions for a collection. (Inherited from Devart.Common.DbConnectionBase)
    Public MethodObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
    Public MethodOverridden. Opens a SQL Server connection with the property settings specified by the ConnectionString.  
    Public MethodResets all values to 0 if statistics gathering is enabled.  
    Public MethodReturns a collection of statistics at the moment the method is called.  
    Public MethodReturns a System.String containing the name of the System.ComponentModel.Component, if any. This method should not be overridden. (Inherited from System.ComponentModel.Component)
    Top
    Public Events
     NameDescription
    Public EventOccurs when connection to the data source is lost in case LocalFailover is set to true. You may use this event to implicitly reconnect and reexecute the current operation.  
    Public EventOccurs when the component is disposed by a call to the System.ComponentModel.Component.Dispose method. (Inherited from System.ComponentModel.Component)
    Public EventOccurs when SQL Server returns an error.  
    Public EventOccurs when SQL Server returns a warning or informational message.  
    Public EventOccurs when the state of the connection changes. (Inherited from Devart.Common.DbConnectionBase)
    Public EventOccurs when the state of the transaction is changed. (Inherited from Devart.Common.DbConnectionBase)
    Public EventOccurs when the state of the transaction is changing. (Inherited from Devart.Common.DbConnectionBase)
    Top
    See Also