ICommandExecuter2.Connect 方法

定义

连接到 SQL Server 实例。

public:
 ManagedBatchParser::ParserAction Connect(int timeout, System::String ^ server, System::String ^ user, System::String ^ password, bool encyptConnection, bool trustServerCertificate);
public ManagedBatchParser.ParserAction Connect (int timeout, string server, string user, string password, bool encyptConnection, bool trustServerCertificate);
abstract member Connect : int * string * string * string * bool * bool -> ManagedBatchParser.ParserAction
Public Function Connect (timeout As Integer, server As String, user As String, password As String, encyptConnection As Boolean, trustServerCertificate As Boolean) As ParserAction

参数

timeout
Int32

连接超时值(秒)。

server
String

服务器名称。

user
String

用户标识符。

password
String

密码。

encyptConnection
Boolean

指示是否应对连接加密。

trustServerCertificate
Boolean

如果为 false,则验证信任服务器证书。

返回

ParserAction

分析器操作,“中止”或“继续”。

适用于