NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ADOConnection.DataSource

Gets or sets the name of the database to connect to.

[Visual Basic]
Public Property DataSource As String
[C#]
public string DataSource {get; set;}
[C++]
public: __property String* get_DataSource();
public: __property void set_DataSource(String*);
[JScript]
public function get DataSource() : String;
public function set DataSource(String);

Property Value

The name of the database to connect to. The default value is an empty string.

Exceptions

Exception Type Condition
OpenConnectionPropertySet The connection is Open. Close the connection.

Remarks

The DataSource property overwrites the cooresponding property within the connection string.

Note   This property is read-only while the connection is open.

Example

The following example shows how to create a connection and set many of its properties.

See Also

ADOConnection Class | ADOConnection Members | System.Data.ADO Namespace | ConnectionTimeout | Database | IsolationLevel | ConnectionString | UserID | Password