diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-11-26 15:11:22 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-11-26 15:11:22 +0900 |
| commit | b87533f9904c10f24d6b2e8177c00944e3efe15b (patch) | |
| tree | c1106a381c851b51e86004698457aef1211b77be /doc/sql.doc | |
| parent | 894037c3e68e1573a34183d936171f8cda5085f3 (diff) | |
| download | tqt-r14.1.x.tar.gz tqt-r14.1.x.zip | |
Replace TRUE/FALSE with boolean values true/false - part 4r14.1.x
Manually cherry-picked from commit 4d495175
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/sql.doc')
| -rw-r--r-- | doc/sql.doc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/sql.doc b/doc/sql.doc index 9754cf178..a2c22521d 100644 --- a/doc/sql.doc +++ b/doc/sql.doc @@ -258,7 +258,7 @@ to setDatbaseName(). When connecting to ODBC data sources the Data Source Name (DSN) should be used in the setDatabaseName() call. Third we call open() to open the database and give us access to the -data. If this call fails it will return FALSE; error information can +data. If this call fails it will return false; error information can be obtained from \l QSqlDatabase::lastError(). \target Connecting_to_Multiple_Databases @@ -292,7 +292,7 @@ function in \c connection.h. \quotefile sql/overview/connection.cpp \skipto #include -\printuntil return TRUE +\printuntil return true \printuntil } \caption From \l sql/overview/connection.cpp @@ -346,7 +346,7 @@ section and use the \l QSqlCursor class covered in \section2 Transactions If the underlying database engine supports transactions -QSqlDriver::hasFeature( QSqlDriver::Transactions ) will return TRUE. +QSqlDriver::hasFeature( QSqlDriver::Transactions ) will return true. You can use QSqlDatabase::transaction() to initiate a transaction, followed by the SQL commands you want to execute within the context of the transaction, and then either QSqlDatabase::commit() or @@ -389,7 +389,7 @@ section. \caption From \l sql/overview/basicbrowsing2/main.cpp The above code introduces a count of how many records are successfully -inserted. Note that isActive() returns FALSE if the query, e.g. the +inserted. Note that isActive() returns false if the query, e.g. the insertion, fails. numRowsAffected() returns -1 if the number of rows cannot be determined, e.g. if the query fails. @@ -818,7 +818,7 @@ examples provides additional information. Data-Aware tables require the \c ntqdatatable.h and \c ntqsqlcursor.h header files. We create our application object, call createConnections() and create the cursor. We create the \l QDataTable passing it a pointer to -the cursor, and set the autoPopulate flag to TRUE. Next we make our \l +the cursor, and set the autoPopulate flag to true. Next we make our \l QDataTable the main widget and call refresh() to populate it with data and call show() to make it visible. @@ -1239,7 +1239,7 @@ We have changed the InvoiceItemCursor constructor. We now create a new QSqlField called productname and append this to the InvoiceItemCursor's set of fields. We call setCalculated() on productname to identify it as a calculated field. The first argument -to setCalculated() is the field name, the second a bool which if TRUE +to setCalculated() is the field name, the second a bool which if true signifies that calculateField() must be called to get the field's value. |
