User Tools

Site Tools


code:data:sql

This is an old revision of the document!


Table of Contents

Sql

This object allows you to establish a connection to a SQL database like MySQL, PostgreSQL, SQLite and others.

Functions

Sql

Constructor function.

Syntax

var myObject = new Sql(driver);

Arguments

  1. driver - (Driver) the database driver to use

Exceptions

  • (NoDatabaseDriverError) no database driver specified

Example

Create a Sql object operating on a MySQL database.

var myObject = new Sql(Sql.MySQL);

Notes

On Windows only the MySQL, PostgreSQL, SQLite 3, Firebird and ODBC drivers are installed by default. To see all available drivers call the drivers function.

Enumerations

Driver

SQL drivers. On Windows only the MySQL, PostgreSQL, SQLite 3, Firebird and ODBC drivers are installed by default.

Values

  1. SQLite2: SQLite 2
  2. SQLite: SQLite 3
  3. PostgreSQL: PostgreSQL (versions 7.3 and above)
  4. MySQL: MySQL
  5. ODBC: Open Database Connectivity (ODBC) - Microsoft SQL Server and other ODBC-compliant databases
  6. TDS: Sybase Adaptive Server (obsolete)
  7. DB2: IBM DB2 (version 7.1 and above)
code/data/sql.1296068504.txt.gz · Last modified: 2021/02/13 11:23 (external edit)