source: trunk/doc/src/sql-driver.qdoc@ 348

Last change on this file since 348 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 32.6 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** Contact: Qt Software Information ([email protected])
5**
6** This file is part of the documentation of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial Usage
10** Licensees holding valid Qt Commercial licenses may use this file in
11** accordance with the Qt Commercial License Agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and Nokia.
14**
15** GNU Lesser General Public License Usage
16** Alternatively, this file may be used under the terms of the GNU Lesser
17** General Public License version 2.1 as published by the Free Software
18** Foundation and appearing in the file LICENSE.LGPL included in the
19** packaging of this file. Please review the following information to
20** ensure the GNU Lesser General Public License version 2.1 requirements
21** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22**
23** In addition, as a special exception, Nokia gives you certain
24** additional rights. These rights are described in the Nokia Qt LGPL
25** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
26** package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you are unsure which license is appropriate for your use, please
37** contact the sales department at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42/*!
43 \page sql-driver.html
44 \title SQL Database Drivers
45 \ingroup architecture
46 \brief How to configure and install QtSql drivers for supported databases.
47
48 The QtSql module uses driver \l{How to Create Qt
49 Plugins}{plugins} to communicate with the different database
50 APIs. Since Qt's SQL Module API is database-independent, all
51 database-specific code is contained within these drivers. Several
52 drivers are supplied with Qt and other drivers can be added. The
53 driver source code is supplied and can be used as a model for
54 \l{#development}{writing your own drivers}.
55
56 \tableofcontents
57
58 \section1 Supported Databases
59
60 The table below lists the drivers included with Qt. Due to
61 license incompatibilities with the GPL, not all of the plugins
62 are provided with Open Source Versions of Qt.
63
64 \table
65 \header \o Driver name \o DBMS
66 \row \o \link #QDB2 QDB2\endlink \o IBM DB2 (version 7.1 and above)
67 \row \o \link #QIBASE QIBASE\endlink \o Borland InterBase
68 \row \o \link #QMYSQL QMYSQL\endlink \o MySQL
69 \row \o \link #QOCI QOCI\endlink \o Oracle Call Interface Driver
70 \row \o \link #QODBC QODBC\endlink
71 \o Open Database Connectivity (ODBC) - Microsoft SQL Server and other
72 ODBC-compliant databases
73 \row \o \link #QPSQL QPSQL\endlink \o PostgreSQL (versions 7.3 and above)
74 \row \o \link #QSQLITE2 QSQLITE2\endlink \o SQLite version 2
75 \row \o \link #QSQLITE QSQLITE\endlink \o SQLite version 3
76 \row \o \link #QTDS QTDS\endlink \o Sybase Adaptive Server
77 \endtable
78
79 \bold{Note:} To build a driver plugin you need to have the appropriate
80 client library for your Database Management System (DBMS). This provides
81 access to the API exposed by the DBMS, and is typically shipped with it.
82 Most installation programs also allow you to install "development
83 libraries", and these are what you need. These libraries are responsible
84 for the low-level communication with the DBMS.
85
86 \target building
87 \section1 Building the Drivers Using Configure
88
89 On Unix and Mac OS X, the Qt \c configure script tries to