PDO_SQLITE DSN

(no version information, might be only in CVS)

PDO_SQLITE DSN -- Connecting to Microsoft SQL Server and Sybase databases

Description

The PDO_SQLITE Data Source Name (DSN) is composed of the following elements:

DSN prefix (SQLite 3)

The DSN prefix is sqlite:.

  • To access a database on disk, append the absolute path to the DSN prefix.

  • To create a database in memory, append memory: to the DSN prefix.

DSN prefix (SQLite 2)

While the default and recommended SQLite version in PDO_SQLITE is version 3, the driver also supports accessing and creating SQLite 2 databases. This enables you to access databases you may have created with the SQLite extension in previous versions of PHP.

The DSN prefix for connecting to SQLite 2 databases is sqlite2:.

  • To access a database on disk, append the absolute path to the DSN prefix.

  • To create a database in memory, append memory: to the DSN prefix.

Examples

Example 1. PDO_SQLITE DSN examples

The following examples show PDO_SQLITE DSN for connecting to SQLite databases:
sqlite:/opt/databases/mydb.sq3
sqlite:memory:
sqlite2:/opt/databases/mydb.sq2
sqlite2:memory:

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 18:00:29