Skip to main content
.NET Framework 4.6.2+

MSSqlConnectionProvider.GetConnectionStringWithAttach Method

Name Parameters Description
GetConnectionStringWithAttach(String, String, Boolean) static server, attachDbFilename, userInstance Returns a connection string to connect to a Microsoft SQL Server database by attaching a specified .mdf database file to a specific server using Windows Integrated Security.
GetConnectionStringWithAttach(String, String, String, String, Boolean) static server, userId, password, attachDbFilename, userInstance Returns a connection string to connect to a Microsoft SQL Server database by attaching a specified .mdf database file to a specific server using specified login credentials.