Connection (gb.db)
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.
SQLite connections
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. See Temp$() for more information.
-
Otherwise, Host gives the database directory, and the database path is the result of concatenating Host and Name.
ODBC connections
For ODBC connections, the following algorithm is used:
-
If Host are defined and also Login, it will connect using it as DSN name.
-
If Host has semicolons at least one, it will assume the property holds a ConnStr.
-
If Host has no semicolons, it will connect using it as DSN name.
See also