Share via


SqlCeConnection.DataSource Property

Gets the file name of the data source.

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

Syntax

'Declaration
Public Overrides ReadOnly Property DataSource As String
    Get
'Usage
Dim instance As SqlCeConnection
Dim value As String

value = instance.DataSource
public override string DataSource { get; }
public:
virtual property String^ DataSource {
    String^ get () override;
}
abstract DataSource : string
override DataSource : string
override function get DataSource () : String

Property Value

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

Remarks

In SQL Server Compact, DataSource is returned as the full path of the database file; for example, "\my app\myDB.sdf". In SQL Server Compact, databases are always stored in separate files.

See Also

Reference

SqlCeConnection Class

System.Data.SqlServerCe Namespace

ConnectionTimeout

Database

ConnectionString