Skip to main content
.NET 6.0+

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.