The SQLConnectionControl type exposes the following members.
Back to Top
Back to Top
Back to Top
Back to Top
Constructors
| Name | Description | |
|---|---|---|
| SQLConnectionControl | Initializes a new instance of the SQLConnectionControl class |
Methods
| Name | Description | |
|---|---|---|
| Disconnect |
Disconnect if the current state is 'connected'.
| |
| RefreshDatabaseList |
Refresh the database list and add values to database list combobox.
| |
| RefreshInstancesList |
Refresh the instances list and add values to instances list combobox.
| |
| TryConnect |
Check connection state now. Raises ConnectionOK or ConnectionFailed events.
|
Properties
| Name | Description | |
|---|---|---|
| Anchor | (Overrides | |
| AutoRefreshDatabaseListOnServerChanged |
If property value is true, then the database list will be refresh automatically after server name changes.
| |
| AutoRefreshInstancesOnSettingsChanged |
Auto refresh the instances list, when one property changed from MySettings property category.
| |
| AutoResfreshConnectionState |
If property value is true, then the control auto refresh the connection state by specified intervals.
| |
| AutoScroll | (Overrides | |
| AutoScrollMargin | ||
| AutoScrollMinSize | ||
| AutoScrollOffset | (Overrides | |
| AutoSelectDatabaseName |
Auto select the specified database name from database list after refresh.
| |
| AutoSelectInstanceName |
Auto select the specified instance from instances list after refresh.
| |
| AutoSelectMethod |
Gets or sets the auto select method of instance and database list.
| |
| AutoSize | (Overrides | |
| AutoSizeMode | ||
| BackColor | (Overrides | |
| BackgroundImage | (Overrides | |
| BackgroundImageLayout | (Overrides | |
| BrowseForDatabaseMethod |
Gets or sets the database search method.
From Stored procedure (sp_databases) or from query (SELECT Name FROM master.dbo.sysdatabases)
| |
| BrowseForInstancesMethod |
Gets or sets the SQL instances search method. (Local only or Network)
| |
| BrowseForLocalInstancesMethod |
Gets or sets the search method for SQL server instances on local server. (From Object Or Registry)
| |
| ColorsConnected |
Gets or sets the colors of 'connected' state.
| |
| ColorsDisconnected |
Gets or sets the colors of 'disconnected' state.
| |
| ColorsIdle |
Gets or sets the colors of 'idle' state.
| |
| ConnectingMessage |
Gets or sets the 'Connecting...' message while the control trying to connect to the database.
Use the {SEC} parameter to display remaining seconds.
| |
| ConnectionRefreshInterval |
Gets or sets the auto refresh interval in milliseconds.
| |
| ConnectionState |
Gets the current state of connection.
| |
| ConnectionString |
Gets or sets the current connectionstring.
| |
| ConnectionTimeOut |
Gets or sets the connection timeout of connection in seconds.
| |
| DatabaseListErrorMsg |
This error message will be shown in messagebox when database list loading fails.
| |
| DatabaseName |
Gets or sets the connection property: DatabaseName.
| |
| Font | (Overrides | |
| InstanceListErrorMsg |
This error message will be shown in messagebox when isntance list loading fails.
| |
| IsControlLoaded |
Returns True, if the SQL connection control is loaded successfully.
| |
| MessageConnected |
Gets or sets the header message of 'connected' state.
| |
| MessageDisconnected |
Gets or sets the header message of 'disconnected' state.
| |
| MessageIdle |
Gets or sets the header message of 'idle' state.
| |
| Password |
Gets or sets the connection property: Password.
| |
| ServerName |
Gets or sets the connection property: ServerName.
| |
| ShowDatabaseListErrors |
Show error message in messagebox when database list loading fails.
| |
| ShowInstanceListErrors |
Show error message in messagebox when instance list loading fails.
| |
| ShowInstanceVersion |
Show the SQL instance version after select instance from combobox. The version number appears under the instances combobox.
| |
| ShowOnlyNamedInstances |
If the property is set to True, then the default instances will be ignored from instances list.
| |
| ShowRuntimeErrors |
Show messagebox for runtime errors.
| |
| SortDatabaseList |
Gets or sets the database list sorted option.
| |
| SortInstancesList |
Gets or sets the instances list sorted option.
| |
| SqlAuthentication |
Gets or sets the authentication type of connection.
If property value is True, then the SQL server authentication will be used.
| |
| TextOfAdvancedPropertiesButton |
Gets or sets the text of "advanced properties" button.
| |
| TextOfAllServers |
Gets or sets the text of "all server" radio button.
| |
| TextOfAuthentication |
Gets or sets the text of "authentication" checkbox.
| |
| TextOfAvailableInstances |
Gets or sets the text of available instances label.
| |
| TextOfCloseAdvancedPropertiesButton |
Gets or sets the text of "close advanced properties" button.
| |
| TextOfConnectButton |
Gets or sets the text of "connecting" button.
| |
| TextOfDatabaseList |
Gets or sets the text of "database list" label.
| |
| TextOfDisconnectButton |
Gets or sets the text of "disconnecting" button.
| |
| TextOfFrame |
Gets or sets the text of control's frame.
| |
| TextOfLocalServers |
Gets or sets the text of "local" radio button.
| |
| TextOfPassword |
Gets or sets the text of "password" label.
| |
| TextOfRefreshDatabasesButton |
Gets or sets the text of "refresh databases" button.
| |
| TextOfRefreshInstancesButton |
Gets or sets the text of "refresh instances" button.
| |
| TextOfUsername |
Gets or sets the text of "username" label.
| |
| ToolTipTextOfAdvancedPropertiesButton |
Gets or sets the tooltip text of "advanced properties" button.
| |
| ToolTipTextOfCloseAdvancedPropertiesButton |
Gets or sets the tooltip text of "close advanced properties" button.
| |
| ToolTipTextOfConnectButton |
Gets or sets the tooltip text of "connect" button.
| |
| ToolTipTextOfDisconnectButton |
Gets or sets the tooltip text of "disconnect" button.
| |
| ToolTipTextOfRefreshDatabasesButton |
Gets or sets the tooltip text of "refresh databases" button.
| |
| ToolTipTextOfRefreshInstancesButton |
Gets or sets the tooltip text of "refresh instances" button.
| |
| UseLocalhost |
Use localhost string instead of machine name in instances combobox.
| |
| UserName |
Gets or sets the connection property: UserName.
|
Events
| Name | Description | |
|---|---|---|
| AfterRefreshDatabaseList |
Occurs after the databases list refresh method is finished.
| |
| AfterRefreshInstancesList |
Occurs after the instances list refresh method is finished.
| |
| BeforeRefreshDatabaseList |
Occurs before the databases list refresh method is started.
| |
| BeforeRefreshInstancesList |
Occurs before the instances list refresh method is started.
| |
| ConnectionFailed |
Occurs when the connection attempt failed.
| |
| ConnectionOk |
Occurs when the connection attempt was successfully.
| |
| ConnectionStateChanged |
Occurs when the connection state changed.
| |
| ConnectionStringChanged |
Occurs when the connection string changed.
| |
| Disconnected |
Occurs when the connection state is changed from Connected state to Disconnected state.
| |
| ErrorOccurred |
Occurs when an error occurred during operations.
| |
| LoadingFinished |
Occurs when the control's Me_Load event is finished.
| |
| LoadingStarted |
Occurs when the control's Me_Load event is started.
| |
| PropertyChanged |
See Also