SQL Yoga version 1.1.0 build 4 :: Visit website

Printer friendly version

function dbconn_get()

Retrieves properties of a Database Connection Object.

function dbconn_get pProp, pConnectionA, [pDBKey]
Simple parameter. pProp The property to get.
OptionalSimple parameter. [pConnName] The name of a Database Connection. The default is the "default connection" for the Database Object.
OptionalSimple parameter. [pDBKey] Database Object connection is associated with. Default is name returned by sqlyoga_getDefaultDatabase().


adaptor: The adaptor that the database uses (mysql, sqlite, odbc, etc.).

connection id: The current RevDB connection id (or V4REV database reference if using Valentina). If you need to call any RevDB or native Valentina calls directly then you will need this value.

database: The name of the Database Object that the connection is associated with.

database name: The name of the database on the server. For sqlite this and the 'file' property are synonymous.

dsn: The DSN you would like to connect to. Used with ODBC and maps to the "host" property.

file: For SQLite databases this is the path to the database file on disk. Synonymous with 'database name'.

host: The host for your database.

last error: The last error reported for this database connection. An error can occur when connection to, disconnecting from or querying the database.

last executed sql: The last SQL statement that was executed using this database connection.

last insert[ed] id: When working with database tables that have auto incrementing primary key fields this will return the value used when creating the last record.

log field: The field where all SQL statements that are executed are logged.

log file: The file where all SQL statements that are executed are logged.

open transactions: The number of transactions that have been opened using dbconn_beginTransaction but not yet closed using dbconn_commitTransaction or dbconn_rollbackTransaction.

port: Port to connect to the database over. Default values for each platform are implied.

quote identifiers: If true then SQL Yoga adds quotes around every table/field name in queries. Default is false.

quotes: The left and right strings used to quote table and field names for the database associated with a connection. An array is returned with two keys - "left" and "right".

type: The type of database that this connection is associated with. For most database types this is the same as the adaptor property. For ODBC it is the type of database that is being connected to through ODBC.

use ssl: Whether or not the connection uses SSL to connect to the database.

valentina client connection id: The id representing the connection with the server when running in client/server mode.

version: The version of the database engine connected to.