dotConnect for MySQL Documentation
Devart.Data.MySql Namespace / MySqlConnectionStringBuilder Class / PipeName Property
Example

In This Topic
    PipeName Property
    In This Topic
    Gets or sets the name of the pipe to use when connecting via a named pipe.
    Syntax
    'Declaration
     
    Public Property PipeName As String
    public string PipeName {get; set;}

    Property Value

    Name of the pipe to use when connecting via a named pipe.
    Remarks

    The value of the PipeName property depends on MySQL server 'socket' option. On Windows this option specifies the pipe name to use when listening for local connections that use a named pipe.

    The default value is MySQL (case-insensitive).

    This feature is not available in Mobile edition.

    Example
    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())
    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