MSSqlConnectionProvider.GetConnectionStringWithAttach(String, String, Boolean) Method
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.
Namespace: DevExpress.Xpo.DB
Assembly: DevExpress.Xpo.v24.2.dll
NuGet Package: DevExpress.Xpo
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
server | String | A string that specifies the SQL server name. |
attach |
String | A string specifying a .mdf database file to attach to the server. This value is used to initialize the “Attach |
user |
Boolean | true to enable User Instances (required when attaching the attach |
#Returns
Type | Description |
---|---|
String | A connection string. |
#Remarks
Note
This method is in effect only for SQL Server 2005 Express Edition databases.
The method enables Integrated Security in the resulting connection string. To connect using specific login credentials (user name and password), call the other Get