summaryrefslogtreecommitdiffstats
path: root/doc/html/sql.html
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-08-06 11:29:57 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-08-06 11:29:57 +0900
commitdcce5b1f2c449ed9a02b1752e0d74f147a83d07d (patch)
treed57fe27457a96451f1a67e2a2db268a441d917fc /doc/html/sql.html
parent649c4c61a1f1f479f4532b196f68df476cef2680 (diff)
downloadtqt-rename/true-false-4.tar.gz
tqt-rename/true-false-4.zip
Replace TRUE/FALSE with boolean values true/false - part 4rename/true-false-4
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/sql.html')
-rw-r--r--doc/html/sql.html40
1 files changed, 20 insertions, 20 deletions
diff --git a/doc/html/sql.html b/doc/html/sql.html
index 9a9aa90d1..4949a7be9 100644
--- a/doc/html/sql.html
+++ b/doc/html/sql.html
@@ -238,7 +238,7 @@ connection.
int main( int argc, char *argv[] )
{
- <a href="tqapplication.html">TQApplication</a> app( argc, argv, FALSE );
+ <a href="tqapplication.html">TQApplication</a> app( argc, argv, false );
<a name="x2141"></a> <a href="tqsqldatabase.html">TQSqlDatabase</a> *defaultDB = TQSqlDatabase::<a href="tqsqldatabase.html#addDatabase">addDatabase</a>( DB_SALES_DRIVER );
<a name="x2143"></a> defaultDB-&gt;<a href="tqsqldatabase.html#setDatabaseName">setDatabaseName</a>( DB_SALES_DBNAME );
@@ -271,7 +271,7 @@ the TQOCI8 (Oracle 8 and 9) driver the TNS Service Name must be passed
to setDatbaseName(). When connecting to ODBC data sources the Data
Source Name (DSN) should be used in the setDatabaseName() call.
<p> 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 <a href="tqsqldatabase.html#lastError">TQSqlDatabase::lastError</a>().
<p> <a name="Connecting_to_Multiple_Databases"></a>
<h3> Connecting to Multiple Databases
@@ -314,7 +314,7 @@ function in <tt>connection.h</tt>.
<a name="x2151"></a> defaultDB-&gt;<a href="tqsqldatabase.html#setHostName">setHostName</a>( DB_SALES_HOST );
<a name="x2149"></a> if ( ! defaultDB-&gt;<a href="tqsqldatabase.html#open">open</a>() ) {
<a name="x2148"></a> <a href="tqapplication.html#qWarning">tqWarning</a>( "Failed to open sales database: " + defaultDB-&gt;<a href="tqsqldatabase.html#lastError">lastError</a>().text() );
- return FALSE;
+ return false;
}
<a href="tqsqldatabase.html">TQSqlDatabase</a> *oracle = TQSqlDatabase::<a href="tqsqldatabase.html#addDatabase">addDatabase</a>( DB_ORDERS_DRIVER, "ORACLE" );
@@ -324,7 +324,7 @@ function in <tt>connection.h</tt>.
oracle-&gt;<a href="tqsqldatabase.html#setHostName">setHostName</a>( DB_ORDERS_HOST );
if ( ! oracle-&gt;<a href="tqsqldatabase.html#open">open</a>() ) {
<a href="tqapplication.html#qWarning">tqWarning</a>( "Failed to open orders database: " + oracle-&gt;<a href="tqsqldatabase.html#lastError">lastError</a>().text() );
- return FALSE;
+ return false;
}
<a href="tqsqlquery.html">TQSqlQuery</a> q(TQString::null, defaultDB);
@@ -341,7 +341,7 @@ function in <tt>connection.h</tt>.
<a href="tqsqlquery.html">TQSqlQuery</a> q2(TQString::null, oracle);
q2.<a href="tqsqlquery.html#exec">exec</a>("create table people (id integer primary key, name char(40))");
- return TRUE;
+ return true;
}
</pre><blockquote><p align="center"><em> From <a href="sql.html">sql/overview/connection.cpp</a>
</em></p>
@@ -355,7 +355,7 @@ function in <tt>connection.h</tt>.
int main( int argc, char *argv[] )
{
- <a href="tqapplication.html">TQApplication</a> app( argc, argv, FALSE );
+ <a href="tqapplication.html">TQApplication</a> app( argc, argv, false );
if ( createConnections() ) {
// Databases successfully opened; get pointers to them:
@@ -401,7 +401,7 @@ section and use the <a href="tqsqlcursor.html">TQSqlCursor</a> class covered in
<h3> Transactions
</h3>
<a name="6-1"></a><p> If the underlying database engine supports transactions
-<a href="tqsqldriver.html#hasFeature">TQSqlDriver::hasFeature</a>( TQSqlDriver::Transactions ) will return TRUE.
+<a href="tqsqldriver.html#hasFeature">TQSqlDriver::hasFeature</a>( TQSqlDriver::Transactions ) will return true.
You can use <a href="tqsqldatabase.html#transaction">TQSqlDatabase::transaction</a>() to initiate a transaction,
followed by the SQL commands you want to execute within the context of
the transaction, and then either <a href="tqsqldatabase.html#commit">TQSqlDatabase::commit</a>() or
@@ -418,7 +418,7 @@ the transaction, and then either <a href="tqsqldatabase.html#commit">TQSqlDataba
int main( int argc, char *argv[] )
{
- <a href="tqapplication.html">TQApplication</a> app( argc, argv, FALSE );
+ <a href="tqapplication.html">TQApplication</a> app( argc, argv, false );
if ( createConnections() ) {
<a name="x2156"></a> <a href="tqsqldatabase.html">TQSqlDatabase</a> *oracledb = TQSqlDatabase::<a href="tqsqldatabase.html#database">database</a>( "ORACLE" );
@@ -469,7 +469,7 @@ section.
</pre><blockquote><p align="center"><em> From <a href="sql-overview-basicbrowsing2-main-cpp.html">sql/overview/basicbrowsing2/main.cpp</a>
</em></p>
</blockquote><p> 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.
<p> <a name="Basic_Data_Manipulation"></a>
@@ -495,7 +495,7 @@ cannot be determined, e.g. if the query fails.
int main( int argc, char *argv[] )
{
- <a href="tqapplication.html">TQApplication</a> app( argc, argv, FALSE );
+ <a href="tqapplication.html">TQApplication</a> app( argc, argv, false );
int rows = 0;
@@ -961,7 +961,7 @@ examples provides additional information.
if ( createConnections() ) {
<a href="tqsqlcursor.html">TQSqlCursor</a> staffCursor( "staff" );
- <a href="tqdatatable.html">TQDataTable</a> *staffTable = new <a href="tqdatatable.html">TQDataTable</a>( &amp;staffCursor, TRUE );
+ <a href="tqdatatable.html">TQDataTable</a> *staffTable = new <a href="tqdatatable.html">TQDataTable</a>( &amp;staffCursor, true );
app.<a href="tqapplication.html#setMainWidget">setMainWidget</a>( staffTable );
<a name="x2211"></a> staffTable-&gt;<a href="tqdatatable.html#refresh">refresh</a>();
staffTable-&gt;<a href="tqwidget.html#show">show</a>();
@@ -976,7 +976,7 @@ examples provides additional information.
</blockquote><p> Data-Aware tables require the <a href="tqdatatable-h.html">tqdatatable.h</a> and <a href="tqsqlcursor-h.html">tqsqlcursor.h</a> header
files. We create our application object, call createConnections() and
create the cursor. We create the <a href="tqdatatable.html">TQDataTable</a> passing it a pointer to
-the cursor, and set the autoPopulate flag to TRUE. Next we make our <a href="tqdatatable.html">TQDataTable</a> the main widget and call refresh() to populate it with data
+the cursor, and set the autoPopulate flag to true. Next we make our <a href="tqdatatable.html">TQDataTable</a> the main widget and call refresh() to populate it with data
and call show() to make it visible.
<p> The autoPopulate flag tells the <a href="tqdatatable.html">TQDataTable</a> whether or nor it should
create columns based on the cursor. autoPopulate does not affect the
@@ -1134,8 +1134,8 @@ confirm their update. We also hold pointers to the <a href="tqsqlcursor.html">TQ
<a href="tqsqlform.html">TQSqlForm</a> since they will need to be accessed outside the constructor.
<p>
-<pre> staffCursor.setTrimmed( "forename", TRUE );
- staffCursor.setTrimmed( "surname", TRUE );
+<pre> staffCursor.setTrimmed( "forename", true );
+ staffCursor.setTrimmed( "surname", true );
</pre>
<p> We call setTrimmed() on the text fields so that any spaces used to
right pad the fields are removed when the fields are retrieved.
@@ -1378,7 +1378,7 @@ to subclass TQDataTable and reimplement the paintField() function.
TQ_OBJECT
public:
CustomTable(
- <a href="tqsqlcursor.html">TQSqlCursor</a> *cursor, bool autoPopulate = FALSE,
+ <a href="tqsqlcursor.html">TQSqlCursor</a> *cursor, bool autoPopulate = false,
<a href="tqwidget.html">TQWidget</a> * parent = 0, const char * name = 0 ) :
<a href="tqdatatable.html">TQDataTable</a>( cursor, autoPopulate, parent, name ) {}
void paintField(
@@ -1504,7 +1504,7 @@ of the calculateField() function since we will be reimplementing it.
{
<a href="tqsqlfieldinfo.html">TQSqlFieldInfo</a> productName( "productname", TQVariant::String );
<a href="tqsqlcursor.html#append">append</a>( productName );
- <a name="x2260"></a> <a href="tqsqlcursor.html#setCalculated">setCalculated</a>( productName.<a href="tqsqlfieldinfo.html#name">name</a>(), TRUE );
+ <a name="x2260"></a> <a href="tqsqlcursor.html#setCalculated">setCalculated</a>( productName.<a href="tqsqlfieldinfo.html#name">name</a>(), true );
}
<a name="x2259"></a>TQVariant InvoiceItemCursor::<a href="tqsqlcursor.html#calculateField">calculateField</a>( const <a href="tqstring.html">TQString</a> &amp; name )
@@ -1524,7 +1524,7 @@ of the calculateField() function since we will be reimplementing it.
<a href="tqsqlfield.html">TQSqlField</a> 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.
<p> <pre> <a name="x2258"></a> invoiceItemTable-&gt;<a href="tqdatatable.html#addColumn">addColumn</a>( "productname", "Product" );
@@ -1548,15 +1548,15 @@ function require some simple expansion. We'll look at each in turn.
{
<a href="tqsqlfieldinfo.html">TQSqlFieldInfo</a> productName( "productname", TQVariant::String );
<a href="tqsqlcursor.html#append">append</a>( productName );
- <a name="x2264"></a> <a href="tqsqlcursor.html#setCalculated">setCalculated</a>( productName.<a href="tqsqlfieldinfo.html#name">name</a>(), TRUE );
+ <a name="x2264"></a> <a href="tqsqlcursor.html#setCalculated">setCalculated</a>( productName.<a href="tqsqlfieldinfo.html#name">name</a>(), true );
<a href="tqsqlfieldinfo.html">TQSqlFieldInfo</a> productPrice( "price", TQVariant::Double );
<a href="tqsqlcursor.html#append">append</a>( productPrice );
- <a href="tqsqlcursor.html#setCalculated">setCalculated</a>( productPrice.<a href="tqsqlfieldinfo.html#name">name</a>(), TRUE );
+ <a href="tqsqlcursor.html#setCalculated">setCalculated</a>( productPrice.<a href="tqsqlfieldinfo.html#name">name</a>(), true );
<a href="tqsqlfieldinfo.html">TQSqlFieldInfo</a> productCost( "cost", TQVariant::Double );
<a href="tqsqlcursor.html#append">append</a>( productCost );
- <a href="tqsqlcursor.html#setCalculated">setCalculated</a>( productCost.<a href="tqsqlfieldinfo.html#name">name</a>(), TRUE );
+ <a href="tqsqlcursor.html#setCalculated">setCalculated</a>( productCost.<a href="tqsqlfieldinfo.html#name">name</a>(), true );
}
</pre><blockquote><p align="center"><em> From <a href="sql-overview-subclass4-main-cpp.html">sql/overview/subclass4/main.cpp</a>
</em></p>