Changeset 846 for trunk/doc/src/sql-programming
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 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/qsqldatatype-table.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 … … 42 28 /*! 43 29 \page sql-types.html 44 \title Recommended Use of Data Types in Databases 30 \title Data Types for Qt-supported Database Systems 31 \brief Recommended data types for database systems 45 32 46 \ingroup best-practices47 48 \section1 Recommended Use of Types in Qt Supported Databases49 50 This table shows the recommended data types used when extracting data51 from the databases supported in Qt. It is important to note that the52 types used in Qt are not necessarily valid as input to the specific53 database. One example could be that a double would work perfectly as54 input for floating point records in a database, but not necessarily55 as a storage format for output from the database since it would be stored56 with 64-bit precision in C++.33 \ingroup qt-sql 34 35 \section1 Recommended Data Types for Qt-Supported Database Systems 36 37 This table shows the recommended data types for extracting data from 38 the databases supported in Qt. Note that types used in Qt are not 39 necessarily valid as input types to a specific database 40 system. e.g., A double might work perfectly as input for floating 41 point records in a particular database, but not necessarily as a 42 storage format for output from that database, because it would be 43 stored with 64-bit precision in C++. 57 44 58 45 \tableofcontents -
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 -
trunk/doc/src/sql-programming/sql-programming.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 … … 50 36 \page sql-programming.html 51 37 \title SQL Programming 38 \ingroup qt-sql 52 39 \nextpage Connecting to Databases 53 40 … … 73 60 \o \l{Executing SQL Statements} 74 61 \list 75 \o \l{ Recommended Use of Data Types in Databases}62 \o \l{Data Types for Qt-supported Database Systems} 76 63 \endlist 77 64 \o \l{Using the SQL Model Classes} … … 119 106 \page sql-connecting.html 120 107 \title Connecting to Databases 108 \ingroup qt-sql 121 109 122 110 \contentspage SQL Programming … … 188 176 \page sql-sqlstatements.html 189 177 \title Executing SQL Statements 178 \ingroup qt-sql 190 179 191 180 \previouspage Connecting to Databases … … 238 227 variants to QString and \c int. 239 228 240 For an overview of the recommended types used with Qt supported 241 Databases, please refer to \l{Recommended Use of Data Types in Databases}{this table}. 229 For an overview of the recommended types for use with Qt-supported 230 Databases, please refer to \l{Data Types for Qt-supported Database 231 Systems} {this table}. 242 232 243 233 You can iterate back and forth using QSqlQuery::next(), … … 338 328 \page sql-model.html 339 329 \title Using the SQL Model Classes 330 \ingroup qt-sql 340 331 341 332 \previouspage Executing SQL Statements … … 484 475 \page sql-presenting.html 485 476 \title Presenting Data in a Table View 477 \ingroup qt-sql 486 478 487 479 \previouspage Using the SQL Model Classes … … 588 580 \page sql-forms.html 589 581 \title Creating Data-Aware Forms 582 \ingroup qt-sql 590 583 591 584 \previouspage Presenting Data in a Table View
Note:
See TracChangeset
for help on using the changeset viewer.