# Connection

This class represents a connection to a database.

To connect to a database, create a connection object, fill the needed properties, and call the Open method.

For SQLite connections, the following algorithm is used:

- If Name is null, then a memory database is opened.
- If Name is an absolute path, then this path is used.
- If Name is a relative path, then:
  - If Host is null, then the database is located in the application temporary directory, which is `/tmp/gambas.$UID/sqlite` .
  - Otherwise, Host gives the database directory, and the database path is the result of concatenating Host and Name.

This class is creatable.

`DIM hConnection AS Connection hConnection = NEW Connection ( )`

Creates a new void connection object.

Properties |  | Methods |
--- | --- | --- | ---
Charset Databases Host Login Name Password Port Tables Type Users Version |  | Begin Close Commit Create Edit Exec Find Open Quote Rollback |