Gets or sets the name of the pipe to use when connecting via a named pipe.
public string PipeName {get; set;}
'Declaration
Public Property PipeName As String
Property Value
Name of the pipe to use when connecting via a named pipe.
These samples demonstrate how to use dotConnect for MySQL to connect to MySQL server using Named Pipe protocol
// set name of pipe as parameter of connection string
string connectionString = "user id=root;password=root;host=localhost;database=test;Pipe Name=My_Test";
MySqlConnection connection = new MySqlConnection(connectionString);
// sets the protocol type
connection.Protocol = MySqlProtocol.Pipe;
connection.Open();
Console.WriteLine(connection.State);
//Another way to set up a connetion
//set name of pipe as property of MySqlConnectionStringBuilder instanse
string connectionString = "user id=root;password=root;host=localhost;database=test";
MySqlConnectionStringBuilder connStrBuilder = new MySqlConnectionStringBuilder(connectionString);
connStrBuilder.PipeName = "My_Test";
MySqlConnection connection = new MySqlConnection(connStrBuilder.ConnectionString);
// sets the protocol type
connection.Protocol = MySqlProtocol.Pipe;
connection.Open();
Console.WriteLine(connection.State);
' set name of pipe as parameter of connection string
Dim connectionString As String = "user id=root;password=root;host=localhost;database=test;Pipe Name=My_Test"
Dim connection As MySqlConnection = New MySqlConnection(connectionString)
' sets the protocol type
connection.Protocol = MySqlProtocol.Pipe
connection.Open()
Console.WriteLine(connection.State.ToString())
' Another way to set up a connetion
' set name of pipe as property of MySqlConnectionStringBuilder instanse
Dim connectionString As String = "user id=root;password=root;host=localhost;database=test"
Dim connStrBuilder As MySqlConnectionStringBuilder = New MySqlConnectionStringBuilder(connectionString)
connStrBuilder.PipeName = "My_Test"
Dim connection As MySqlConnection = New MySqlConnection(connStrBuilder.ConnectionString)
' sets the protocol type
connection.Protocol = MySqlProtocol.Pipe
connection.Open()
Console.WriteLine(connection.State.ToString())
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