asp.net.ph

OleDbConnection.Provider Property

System.Data.OleDb Namespace   OleDbConnection Class


Returns the name of the OLE DB provider.

Syntax


Script [ string variable = ] OleDbConnection.Provider

Property Value


variable Returns the name of the provider as specified in the "Provider" clause of the connection string.

The property is read only with no default value.

NOTE: You can change the value for this property only by setting the associated keyword in the ConnectionString property.

Example

The following example illustrates several possible providers to use when setting the connection string.

Provider=MSDAORA; Data Source=ORACLE8i7; User ID=OLEDB; Password=OLEDB
Provider=SQLOLEDB; Data Source=myServer; Integrated Security=SSPI;
Provider=Microsoft.ACE.OLEDB.12.0; Data Source=myData.mdb;

The following example shows the simplest way to retrieve and display the Provider property of the current connection.

"Provider: " + myConn.Provider;
  C# VB

 Show me 

See Also

OleDbConnection Members   ConnectionString Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note