OleDbConnectionStringBuilder builder = new OleDbConnectionStringBuilder(); builder.Add("Provider", "Microsoft.ACE.OLEDB.12.0");
OleDbConnectionStringBuilder builder = new OleDbConnectionStringBuilder(); builder.Add("Provider", "Microsoft.ACE.OLEDB.12.0"); builder.Add("Data Source", @"C:\Data\example.accdb"); builder.Add("User ID", "admin"); builder.Add("Password", "password");In this example, we add multiple key-value pairs to the connection string. In addition to the provider, we specify the data source, user ID, and password. Package library: This class is part of the .NET framework and does not require any external package or library.