OleDbConnectionStringBuilder::Clear Method ()
Clears the contents of the OleDbConnectionStringBuilder instance.
Assembly: System.Data (in System.Data.dll)
The Clear method removes all key/value pairs from the OleDbConnectionStringBuilder, and resets all corresponding properties to their default values. This includes setting the Count property to 0, and setting the ConnectionString property to an empty string.
The following example demonstrates the effect of calling the Clear method. This example populates the OleDbConnectionStringBuilder with some key/value pairs, and then calls the Clear method and shows the results.
Note |
|---|
This example includes a password to demonstrate how OleDbConnectionStringBuilder works with connection strings. In your applications, we recommend that you use Windows Authentication. If you must use a password, do not include a hard-coded password in your application. |
Available since 2.0
