Search Results for

    Show / Hide Table of Contents

    GetConnectionId method

    The value returned by this method is used in the "Connection Wizard" to display short information about the connection.

    This value usually contains the name of the connection type and the name of the database. In MsSqlDataConnection the implementation of the method looks like this:

    public override string GetConnectionId()
    {
      SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(ConnectionString);
      string info = builder.InitialCatalog;
      if (String.IsNullOrEmpty(info))
        info = builder.AttachDBFilename;
      return "MS SQL: " + info;
    }
    

    Note that SqlConnectionStringBuilder is used to parse the connection string (ConnectionString property).

    You have to override this method.

    Back to top © 1998-2025 Copyright Fast Reports Inc.