Qt SQL Reference Documentation

Books

Cached SQL Table

TableEditor Class Definition

TableEditor Class Implementation

Changes to Qt SQL

The QSqlQuery class

boundValues() Signature

Connecting to Databases

Creating Data-Aware Forms

Data Types for Qt-supported Database Systems

Recommended Data Types for Qt-Supported Database Systems

IBM DB2 Data Types

Borland InterBase Data Types

MySQL Data Types

Oracle Call Interface Data Types

ODBC Data Types

PostgreSQL Data Types

QSQLITE SQLite version 3 Data Types

Mimer SQL Data Types

Drill Down Example

InformationWindow Class Definition

InformationWindow Class Implementation

View Class Definition

View Class Implementation

ImageItem Class Definition

ImageItem Class Implementation

Executing SQL Statements

Executing a Query

Navigating the Result Set

Inserting, Updating, and Deleting Records

Transactions

Master Detail Example

Presenting Data in a Table View

QSqlQuery examples

Approaches to Binding Values

Qt SQL

Using the Module

Building with CMake

Building with qmake

Articles and Guides

Examples

Reference

Module Evolution

Licenses and Attributions

Query Model Example

Relational Table Model Example

SQL Browser

SQL Database Drivers

DriverWithQt

DriverStandalone

QMYSQL

QOCI

QODBC

QPSQL

QDB2

QSQLITE

QMIMER

QIBASE

Supported Databases

Building the Drivers

Compile Qt with a specific driver

Compile only a specific SQL driver

Driver Specifics

QMYSQL for MySQL or MariaDB 5.6 and higher

Timestamp Support

QMYSQL Stored Procedure Support

Embedded MySQL Server

Connection options

How to Build the QMYSQL Plugin on Unix and macOS

How to Build the QMYSQL Plugin on Windows

QOCI for the Oracle Call Interface (OCI)

OCI User Authentication

OCI BLOB/LOB Support

Connection options

How to Build the OCI Plugin on Unix and macOS

How to Build the OCI Plugin on Windows

QODBC for Open Database Connectivity (ODBC)

Timestamp Support

ODBC Stored Procedure Support

ODBC Unicode Support

Connection options

How to Build the ODBC Plugin on Unix and macOS

How to Build the ODBC Plugin on Windows

QPSQL for PostgreSQL (Version 7.3 and above)

Timestamp Support

QPSQL Unicode Support

QPSQL Case Sensitivity

QPSQL Forward-only query support

Connection options

How to Build the QPSQL Plugin on Unix and macOS

How to Build the QPSQL Plugin on Windows

QDB2 for IBM DB2 (Version 7.1 and above)

Connection options

How to Build the QDB2 Plugin on Unix and macOS

How to Build the QDB2 Plugin on Windows

QSQLITE for SQLite (Version 3 and above)

Timestamp Support

Connection options

How to Build the QSQLITE Plugin

Enable REGEXP operator

QSQLITE File Format Compatibility

QMIMER for Mimer SQL version 11 and higher

Timestamp Support

QMIMER Stored Procedure Support

How to Build the QMIMER Plugin on Unix and macOS

How to Build the QMIMER Plugin on Windows

QIBASE for Borland InterBase

Timestamp Support

Connection options

How to Build the QIBASE Plugin

QIBASE Stored procedures

How to Build the QIBASE Plugin on Unix and macOS

How to Build the QIBASE Plugin on Windows

Troubleshooting

How to Write Your Own Database Driver

SQL Programming

Topics:

Database Classes

Driver Layer

SQL API Layer

User Interface Layer

SQL Widget Mapper Example

Window Class Definition

Window Class Implementation

Summary and Further Reading

Table Model Example

Using the SQL Model Classes

The SQL Query Model

The SQL Table Model

The SQL Relational Table Model

Database Classes

Qt SQL C++ Classes