xSQL Schema Compare SDK for SQL Server version 12
SqlServer Constructor(String,SqlAuthenticationTypeEnum,String,String)


The name of the SQL Server instance.
A xSQL.Utils.SqlAuthenticationTypeEnum value that indicates the authentication type that should be used to connect to the SQL Server.
The username to connect to SQL Server, required by the SQL Server authentication or the Active Directory password-based authentication.
The password to connect to SQL Server, required by the SQL Server authentication or the Active Directory password-based authentication.
Initializes a new instance of SqlServer class with the specified name, authentication type, username and password.
Syntax
'Declaration
 
Public Function New( _
   ByVal serverName As System.String, _
   ByVal authType As xSQL.Utils.SqlAuthenticationTypeEnum, _
   ByVal username As System.String, _
   ByVal password As System.String _
)
public SqlServer( 
   System.string serverName,
   xSQL.Utils.SqlAuthenticationTypeEnum authType,
   System.string username,
   System.string password
)
public: SqlServer( 
   System.string* serverName,
   xSQL.Utils.SqlAuthenticationTypeEnum authType,
   System.string* username,
   System.string* password
)

Parameters

serverName
The name of the SQL Server instance.
authType
A xSQL.Utils.SqlAuthenticationTypeEnum value that indicates the authentication type that should be used to connect to the SQL Server.
username
The username to connect to SQL Server, required by the SQL Server authentication or the Active Directory password-based authentication.
password
The password to connect to SQL Server, required by the SQL Server authentication or the Active Directory password-based authentication.
Exceptions
ExceptionDescription
System.ArgumentNullException

The serverName parameter is null

or

The username parameter is null and the authType is xSQL.Utils.SqlAuthenticationTypeEnum.SqlServerAuthentication or xSQL.Utils.SqlAuthenticationTypeEnum.ActiveDirectoryPasswordAuthentication.

or

The password parameter is null and the authType is xSQL.Utils.SqlAuthenticationTypeEnum.SqlServerAuthentication or xSQL.Utils.SqlAuthenticationTypeEnum.ActiveDirectoryPasswordAuthentication.

System.ArgumentException

The serverName parameter is an empty string

or

The username parameter is an empty string and the authType is xSQL.Utils.SqlAuthenticationTypeEnum.SqlServerAuthentication or xSQL.Utils.SqlAuthenticationTypeEnum.ActiveDirectoryPasswordAuthentication.

or

The password parameter is an empty string and the authType is xSQL.Utils.SqlAuthenticationTypeEnum.SqlServerAuthentication or xSQL.Utils.SqlAuthenticationTypeEnum.ActiveDirectoryPasswordAuthentication.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SqlServer Class
SqlServer Members
Overload List

 

 


©Copyright 2022 xSQL Software. All Rights Reserved.

Send Feedback