Difference between revisions of "Gambas/libraries/gb.db/Connection"
Jump to navigation
Jump to search
m (→Identifiers: formatting tweaks) |
m (→Navigation: navbar tweak) |
||
Line 1: | Line 1: | ||
==Navigation== | ==Navigation== | ||
− | [[computing]]: [[software]]: [[programming]]: [[Gambas]]: [[gb.db]]. | + | [[computing]]: [[software]]: [[programming]]: [[Gambas]]: [[gb.db]].'''Connection''' |
+ | |||
==Overview== | ==Overview== | ||
The [[gb.db.Connection]] class provides an interface to a particular [[database engine]] connection. It is similar to the Connection interface in [[ADO (Microsoft)|ADO]]. | The [[gb.db.Connection]] class provides an interface to a particular [[database engine]] connection. It is similar to the Connection interface in [[ADO (Microsoft)|ADO]]. |
Revision as of 22:04, 5 December 2006
computing: software: programming: Gambas: gb.db.Connection
Overview
The gb.db.Connection class provides an interface to a particular database engine connection. It is similar to the Connection interface in ADO.
Usage
To connect to a database server: 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 ( )
Identifiers
Properties | Methods |
---|---|
|