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::Clear Method ()

 

Clears the contents of the OleDbConnectionStringBuilder instance.

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

public:
virtual void Clear() override

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.

System_CAPS_noteNote

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.

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