Changeset 846 for trunk/doc/src/sql-programming/sql-driver.qdoc
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/doc/src/sql-programming/sql-driver.qdoc
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 7 7 ** This file is part of the documentation of the Qt Toolkit. 8 8 ** 9 ** $QT_BEGIN_LICENSE: LGPL$9 ** $QT_BEGIN_LICENSE:FDL$ 10 10 ** Commercial Usage 11 11 ** Licensees holding valid Qt Commercial licenses may use this file in 12 12 ** accordance with the Qt Commercial License Agreement provided with the 13 ** Software or, alternatively, in accordance with the terms contained in 14 ** awritten agreement between you and Nokia.13 ** Software or, alternatively, in accordance with the terms contained in a 14 ** written agreement between you and Nokia. 15 15 ** 16 ** GNU Lesser General Public License Usage 17 ** Alternatively, this file may be used under the terms of the GNU Lesser 18 ** General Public License version 2.1 as published by the Free Software 19 ** Foundation and appearing in the file LICENSE.LGPL included in the 20 ** packaging of this file. Please review the following information to 21 ** ensure the GNU Lesser General Public License version 2.1 requirements 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 ** 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this 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. 16 ** GNU Free Documentation License 17 ** Alternatively, this file may be used under the terms of the GNU Free 18 ** Documentation License version 1.3 as published by the Free Software 19 ** Foundation and appearing in the file included in the packaging of this 20 ** file. 35 21 ** 36 22 ** If you have questions regarding the use of this file, please contact … … 45 31 \brief How to configure and install QtSql drivers for supported databases. 46 32 47 \ingroup best-practices33 \ingroup qt-sql 48 34 49 35 The QtSql module uses driver \l{How to Create Qt … … 75 61 \row \o \link #QSQLITE2 QSQLITE2\endlink \o SQLite version 2 76 62 \row \o \link #QSQLITE QSQLITE\endlink \o SQLite version 3 77 \row \o \link #QTDS QTDS\endlink \o Sybase Adaptive Server 63 \row \o \link #QTDS QTDS\endlink \o Sybase Adaptive Server \note obsolete from Qt 4.7 78 64 \endtable 79 65 … … 168 154 \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 3 169 155 170 After installing Qt, as described in the \l{Installing Qt onX11156 After installing Qt, as described in the \l{Installing Qt for X11 171 157 Platforms} document, you also need to install the plugin in the 172 158 standard location: … … 192 178 built in release mode only. If you are expecting a debug version 193 179 to be built as well, don't use the \c{"-o Makefile"} option. 180 181 \section3 How to build the MySQL driver for MinGW users 182 183 The following steps have been used successfully for WinXP SP3. In 184 this example, Qt 4.6.2 is shown. 185 186 \list 187 188 \o Download the following components: 189 \list 190 \o \c{MinGW-5.1.6.exe} 191 \o \c{mingw-utils-0.3.tar.gz} 192 \o Qt sources, e.g. \c{qt-everywhere-opensource-src-4.6.2.zip} 193 \o \c{mysql-5.1.35-win32.msi} 194 \endlist 195 196 \o Install \c{MinGW-5.1.6.exe} in, e.g. \c{C:\MinGW}. 197 198 \o Extract \c{mingw-utils-0.3.tar.gz} into, e.g. \c{C:\MinGW}. 199 200 \o Add the path for \c{MinGW-5.1.6.exe} to your \c{PATH} variable, 201 e.g. \c{C:\MinGW\bin;} 202 203 \o Extract the Qt sources, (\c{qt-everywhere-opensource-src-4.6.2.zip}), 204 into, e.g. \c{C:\Qt}. 205 206 \o Add the path for the eventual Qt binary to your \c{PATH} variable, 207 e.g. \c{C:\Qt\4.6.2\bin;}. 208 209 \o Install MySQL (\c{mysql-5.1.35-win32.msi}), customizing the 210 components. Select only the headers and libraries. Install in, 211 e.g. \c{C:\MySQL\MySQL51}. 212 213 \o Open the DOS prompt, go to \c{C:\MySQL\MySQL51\lib\opt}, and run 214 the following commands: 215 \list 216 \o \c{reimp -d libmysql.lib} 217 \o \c{dlltool -k -d libmysql.def -l libmysql.a} 218 \endlist 219 220 \o Open the DOS prompt, go to \c{C:\Qt\4.6.2} and run the following commands: 221 \list 222 \o \c{configure.exe -debug-and-release -platform win32-g++ -qt-sql-mysql 223 -l mysql -I C:\MySQL\MySQL51\include -L C:\MySQL\MySQL51\lib\opt} 224 \o \c{mingw32-make sub-src} 225 \endlist 226 This step takes a long time. 227 228 \o Open the DOS prompt, go to 229 \c{C:\Qt\4.6.2\src\plugins\sqldrivers\mysql} and run the 230 following command: 231 \list 232 \o \c{qmake "INCLUDEPATH+=C:\MySQL\MySQL51\include" "LIBS+=-L. mysql" mysql.pro} 233 \endlist 234 235 \o Now the following libraries are ready in \c{C:\Qt\4.6.2\plugins\sqldrivers}. 236 \list 237 \o \c{libqsqlmysql4.a} 238 \o \c{libqsqlmysqld4.a} 239 \o \c{qsqlmysql4.dll} 240 \o \c{qsqlmysqld4.dll} 241 \endlist 242 To use the SDK and QtCreator directly, copy these libraries to 243 your \c{C:\Qt\...\qt\plugins\sqldrivers\}, and copy 244 \c{C:\MySQL\MySQL51\lib\opt\libmysql.dll} to your \c{C:\Qt\...\qt\bin\}. 245 246 \endlist 194 247 195 248 \target QOCI … … 262 315 263 316 Choosing the option "Programmer" in the Oracle Client Installer from 264 the Oracle Client Installation CD is sufficient to build the plugin. 317 the Oracle Client Installation CD is generally sufficient to build the 318 plugin. For some versions of Oracle Client, you may also need to select 319 the "Call Interface (OCI)" option if it is available. 265 320 266 321 Build the plugin as follows (here it is assumed that Oracle Client is … … 426 481 \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 13 427 482 428 After installing Qt, as described in the \l{Installing Qt onX11 Platforms} document,483 After installing Qt, as described in the \l{Installing Qt for X11 Platforms} document, 429 484 you also need to install the plugin in the standard location: 430 485 … … 446 501 \target QTDS 447 502 \section2 QTDS for Sybase Adaptive Server 503 504 \note TDS is no longer used by MS Sql Server, and is superceded by 505 \l{QODBC}{ODBC}. QTDS is obsolete from Qt 4.7. 506 448 507 \section3 General Information about QTDS 449 508 … … 509 568 \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 18 510 569 511 After installing Qt, as described in the \l{Installing Qt onX11 Platforms} document,570 After installing Qt, as described in the \l{Installing Qt for X11 Platforms} document, 512 571 you also need to install the plugin in the standard location: 513 572 … … 582 641 \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 21 583 642 584 After installing Qt, as described in the \l{Installing Qt onX11 Platforms} document,643 After installing Qt, as described in the \l{Installing Qt for X11 Platforms} document, 585 644 you also need to install the plugin in the standard location: 586 645
Note:
See TracChangeset
for help on using the changeset viewer.