Skip to main content
.NET 8.0+

MSSqlConnectionProvider.GetConnectionString2005WithCache(String, String) Method

Returns a connection string used to open a specified Microsoft SQL database using Windows Integrated Security and to enable the SqlDependency feature.

Namespace: DevExpress.Xpo.DB

Assembly: DevExpress.Xpo.v24.2.dll

Declaration

public static string GetConnectionString2005WithCache(
    string server,
    string database
)

Parameters

Name Type Description
server String

A string that specifies the SQL server name.

database String

A string that specifies the database name.

Returns

Type Description
String

A connection string.

Remarks

Use the GetConnectionString2005WithCache method to create a cached data store provider via the corresponding XpoDefault.GetConnectionProvider method call. A cached data store provider will comprise a Root element (MSSql2005SqlDependencyCacheRoot) and Node element (DataCacheNode) linked to it.

XpoDefault.DataLayer = new SimpleDataLayer(XpoDefault.GetConnectionProvider(
    MSSqlConnectionProvider.GetConnectionString2005WithCache(   
    "(local)", "XPOSqlServer2005CacheAndNotification"),   
    AutoCreateOption.DatabaseAndSchema)); 

If you want to create a cached data store provider comprising only a MSSql2005SqlDependencyCacheRoot element, use the MSSqlConnectionProvider.GetConnectionString2005CacheRoot method.

See Also