Mono Class Library: Mono.Data.SqliteClient.SqliteConnection Overview | Members

Mono.Data.SqliteClient.SqliteConnection.ConnectionString Property

A connection string specifying how to connect to the database. [Edit]

public override string ConnectionString { set; get; }

Value

See the remarks section below. [Edit]

Remarks

The format of a basic connection string is URI=file:/path/to/file, for example URI=file:SqliteTest.db. That will use the database SqliteTest.db in the current directory. It will be created if it does not exist.

The ADO.NET adapter will use SQLite version 2 by default, but if version 2 is not found and version 3 is available, it will fall back to version 3. You can force the adapter to use version 3 by adding "version=3" to the connection string: URI=file:SqliteTest.db,version=3.

These are the available connection string parameters, which should be separated by semicolons:

NamePurposeExample
URIa file Universal Resource Identifier (only file:)URI=file:SqliteTest.db
versionversion of Sqlite to use: 2 or 3; the version must be installed on the systemversion=3
busy_timeouta timeout, in milliseconds, to wait when the database is locked before throwing a SqliteBusyException, or zero to timeout immediately (since Mono 1.1.14)nbusy_timeout=3000

The busy_timeout parameter is implemented as a call to sqlite(3)_busy_timeout (http://sqlite.org/capi3ref.html#sqlite3_busy_timeout). The default value is 0, which means the adapter should throw a SqliteBusyException immediately if the database is locked.

[Edit]

Requirements

Namespace: Mono.Data.SqliteClient
Assembly: Mono.Data.SqliteClient (in Mono.Data.SqliteClient.dll)
Assembly Versions: 2.0.0.0