This documentation is archived and is not being maintained.

SqlCeConnection.DataSource Property

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Gets the file name of the data source. In SQL Server CE, databases are always stored in separate files.

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

Property Value

The location and file name of the data source. The default value is an empty string.

Remarks

In SQL Server CE, DataSource is returned as the full path of the database file; for example, "\my app\myDB.sdf".

Requirements

Platforms: .NET Compact Framework

.NET Framework Security: 

See Also

SqlCeConnection Class | SqlCeConnection Members | System.Data.SqlServerCe Namespace | ConnectionTimeout | Database | ConnectionString

Show: