C# Class Wix.SonarQube.SqlServerHelper

Mostra file Open project: SonarQubeCommunity/sonarqube-windows-installer

Public Methods

Method Description
CreateSqlConnectionWithSqlLogin ( string dataSource, string username, string password, string databaseName = null ) : SqlConnection

Creates sql connection object with sql login

CreateSqlConnectionWithWindowsLogin ( string dataSource, string databaseName = null ) : SqlConnection

Create SqlConnection object for windows authentication

IsSqlServerInstalled ( ) : bool

Checks if sql is already installed on the machine

TestSqlConnectionWithSqlServerLogin ( string dataSource, string username, string password ) : bool

Tries to connect to sql database with user provided credentials

TestSqlServerConnectionWithWindowsLogin ( string dataSource ) : bool

Tries to connect to sql database with windows login.

Private Methods

Method Description
CheckSqlServer ( RegistryKey instanceKey ) : bool

Method Details

CreateSqlConnectionWithSqlLogin() public static method

Creates sql connection object with sql login
public static CreateSqlConnectionWithSqlLogin ( string dataSource, string username, string password, string databaseName = null ) : SqlConnection
dataSource string
username string
password string
databaseName string
return System.Data.SqlClient.SqlConnection

CreateSqlConnectionWithWindowsLogin() public static method

Create SqlConnection object for windows authentication
public static CreateSqlConnectionWithWindowsLogin ( string dataSource, string databaseName = null ) : SqlConnection
dataSource string
databaseName string
return System.Data.SqlClient.SqlConnection

IsSqlServerInstalled() public static method

Checks if sql is already installed on the machine
public static IsSqlServerInstalled ( ) : bool
return bool

TestSqlConnectionWithSqlServerLogin() public static method

Tries to connect to sql database with user provided credentials
public static TestSqlConnectionWithSqlServerLogin ( string dataSource, string username, string password ) : bool
dataSource string
username string
password string
return bool

TestSqlServerConnectionWithWindowsLogin() public static method

Tries to connect to sql database with windows login.
public static TestSqlServerConnectionWithWindowsLogin ( string dataSource ) : bool
dataSource string
return bool