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
public string DataSource {get;}
public: __property String* get_DataSource();
public function get DataSource() : String;

Property Value

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


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


Platforms: .NET Compact Framework

.NET Framework Security: 

See Also

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