Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

OleDbConnectionStringBuilder::OleDbServices Property

 

Gets or sets the value to be passed for the OLE DB Services key within the connection string.

Namespace:   System.Data.OleDb
Assembly:  System.Data (in System.Data.dll)

public:
property int OleDbServices {
	int get();
	void set(int value);
}

Property Value

Type: System::Int32

Returns the value corresponding to the OLE DB Services key within the connection string. By default, the value is -13.

The OLE DB Services key within the connection string defines a combination of values that let developers enable or disable OLE DB services. The property contains a bitwise combination of values, described in the OLE DB documentation. For more information about appropriate values for this property, see the OLE DB Programmer's Reference, in particular, "Overriding Provider Service Defaults." The default value for this property is -13. This corresponds to a request for resource pooling, automatic transaction enlistment, session-level aggregation, and no client cursor engine.

The following example works with the OleDbServices property in two ways. First, it assigns a value directly to the property, demonstrating the effect this action has on the resulting connection string. Then, the example clears the OleDbConnectionStringBuilder and assigns a complete connection string that contains a value for the OLE DB Services key. This step demonstrates that setting the value from the connection string modifies the OleDbServices property, as well.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft