OleDbConnectionStringBuilder.Provider Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a string that contains the name of the data provider associated with the internal connection string.
public:
property System::String ^ Provider { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Data.OleDb.OleDbConnectionStringBuilder+OleDbProviderConverter))]
public string Provider { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Data.OleDb.OleDbConnectionStringBuilder+OleDbProviderConverter))>]
member this.Provider : string with get, set
Public Property Provider As String
Property Value
The value of the Provider property, or String.Empty
if none has been supplied.
- Attributes
Remarks
If the value passed in is null when you try to set the property, the Provider property is reset. If the value has not been set and the developer tries to retrieve the property, the return value is String.Empty
. This property corresponds to the "Provider" key within the connection string.
Setting the value of the Provider
property, either directly (by setting the ConnectionString property) or by passing a connection string as a parameter to the constructor, might affect the set of key/value pairs that are contained within the OleDbConnectionStringBuilder instance. Setting the Provider property to "sqloledb," for example, adds all the standard SQL connection string properties. See the example in this topic for a demonstration of this behavior.
For some providers, assigning a connection string within the OleDbConnectionStringBuilder constructor causes the order of supplied key/value pairs to be rearranged.