summaryrefslogtreecommitdiffstats
path: root/doc/html/sql.html
diff options
context:
space:
mode:
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 f9b1b8d6f..aeec6c9d2 100644
--- a/doc/html/sql.html
+++ b/doc/html/sql.html
@@ -239,7 +239,7 @@ connection.
int main( int argc, char *argv[] )
{
- <a href="ntqapplication.html">TQApplication</a> app( argc, argv, FALSE );
+ <a href="ntqapplication.html">TQApplication</a> app( argc, argv, false );
<a name="x2141"></a> <a href="ntqsqldatabase.html">TQSqlDatabase</a> *defaultDB = TQSqlDatabase::<a href="ntqsqldatabase.html#addDatabase">addDatabase</a>( DB_SALES_DRIVER );
<a name="x2143"></a> defaultDB-&gt;<a href="ntqsqldatabase.html#setDatabaseName">setDatabaseName</a>( DB_SALES_DBNAME );
@@ -272,7 +272,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="ntqsqldatabase.html#lastError">TQSqlDatabase::lastError</a>().
<p> <a name="Connecting_to_Multiple_Databases"></a>
<h3> Connecting to Multiple Databases
@@ -315,7 +315,7 @@ function in <tt>connection.h</tt>.
<a name="x2151"></a> defaultDB-&gt;<a href="ntqsqldatabase.html#setHostName">setHostName</a>( DB_SALES_HOST );
<a name="x2149"></a> if ( ! defaultDB-&gt;<a href="ntqsqldatabase.html#open">open</a>() ) {
<a name="x2148"></a> <a href="ntqapplication.html#qWarning">tqWarning</a>( "Failed to open sales database: " + defaultDB-&gt;<a href="ntqsqldatabase.html#lastError">lastError</a>().text() );
- return FALSE;
+ return false;
}
<a href="ntqsqldatabase.html">TQSqlDatabase</a> *oracle = TQSqlDatabase::<a href="ntqsqldatabase.html#addDatabase">addDatabase</a>( DB_ORDERS_DRIVER, "ORACLE" );
@@ -325,7 +325,7 @@ function in <tt>connection.h</tt>.
oracle-&gt;<a href="ntqsqldatabase.html#setHostName">setHostName</a>( DB_ORDERS_HOST );
if ( ! oracle-&gt;<a href="ntqsqldatabase.html#open">open</a>() ) {
<a href="ntqapplication.html#qWarning">tqWarning</a>( "Failed to open orders database: " + oracle-&gt;<a href="ntqsqldatabase.html#lastError">lastError</a>().text() );
- return FALSE;
+ return false;
}
<a href="ntqsqlquery.html">TQSqlQuery</a> q(TQString::null, defaultDB);
@@ -342,7 +342,7 @@ function in <tt>connection.h</tt>.
<a href="ntqsqlquery.html">TQSqlQuery</a> q2(TQString::null, oracle);
q2.<a href="ntqsqlquery.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>
@@ -356,7 +356,7 @@ function in <tt>connection.h</tt>.
int main( int argc, char *argv[] )
{
- <a href="ntqapplication.html">TQApplication</a> app( argc, argv, FALSE );
+ <a href="ntqapplication.html">TQApplication</a> app( argc, argv, false );
if ( createConnections() ) {
// Databases successfully opened; get pointers to them:
@@ -402,7 +402,7 @@ section and use the <a href="ntqsqlcursor.html">TQSqlCursor</a> class covered in
<h3> Transactions
</h3>
<a name="6-1"></a><p> If the underlying database engine supports transactions
-<a href="ntqsqldriver.html#hasFeature">TQSqlDriver::hasFeature</a>( TQSqlDriver::Transactions ) will return TRUE.
+<a href="ntqsqldriver.html#hasFeature">TQSqlDriver::hasFeature</a>( TQSqlDriver::Transactions ) will return true.
You can use <a href="ntqsqldatabase.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="ntqsqldatabase.html#commit">TQSqlDatabase::commit</a>() or
@@ -419,7 +419,7 @@ the transaction, and then either <a href="ntqsqldatabase.html#commit">TQSqlDatab
int main( int argc, char *argv[] )
{
- <a href="ntqapplication.html">TQApplication</a> app( argc, argv, FALSE );
+ <a href="ntqapplication.html">TQApplication</a> app( argc, argv, false );
if ( createConnections() ) {
<a name="x2156"></a> <a href="ntqsqldatabase.html">TQSqlDatabase</a> *oracledb = TQSqlDatabase::<a href="ntqsqldatabase.html#database">database</a>( "ORACLE" );
@@ -470,7 +470,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>
@@ -496,7 +496,7 @@ cannot be determined, e.g. if the query fails.
int main( int argc, char *argv[] )
{
- <a href="ntqapplication.html">TQApplication</a> app( argc, argv, FALSE );
+ <a href="ntqapplication.html">TQApplication</a> app( argc, argv, false );
int rows = 0;
@@ -962,7 +962,7 @@ examples provides additional information.
if ( createConnections() ) {
<a href="ntqsqlcursor.html">TQSqlCursor</a> staffCursor( "staff" );
- <a href="ntqdatatable.html">TQDataTable</a> *staffTable = new <a href="ntqdatatable.html">TQDataTable</a>( &amp;staffCursor, TRUE );
+ <a href="ntqdatatable.html">TQDataTable</a> *staffTable = new <a href="ntqdatatable.html">TQDataTable</a>( &amp;staffCursor, true );
app.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( staffTable );
<a name="x2211"></a> staffTable-&gt;<a href="ntqdatatable.html#refresh">refresh</a>();
staffTable-&gt;<a href="ntqwidget.html#show">show</a>();
@@ -977,7 +977,7 @@ examples provides additional information.
</blockquote><p> Data-Aware tables require the <a href="qdatatable-h.html">ntqdatatable.h</a> and <a href="qsqlcursor-h.html">ntqsqlcursor.h</a> header
files. We create our application object, call createConnections() and
create the cursor. We create the <a href="ntqdatatable.html">TQDataTable</a> passing it a pointer to
-the cursor, and set the autoPopulate flag to TRUE. Next we make our <a href="ntqdatatable.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="ntqdatatable.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="ntqdatatable.html">TQDataTable</a> whether or nor it should
create columns based on the cursor. autoPopulate does not affect the
@@ -1135,8 +1135,8 @@ confirm their update. We also hold pointers to the <a href="ntqsqlcursor.html">T
<a href="ntqsqlform.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.
@@ -1379,7 +1379,7 @@ to subclass TQDataTable and reimplement the paintField() function.
TQ_OBJECT
public:
CustomTable(
- <a href="ntqsqlcursor.html">TQSqlCursor</a> *cursor, bool autoPopulate = FALSE,
+ <a href="ntqsqlcursor.html">TQSqlCursor</a> *cursor, bool autoPopulate = false,
<a href="ntqwidget.html">TQWidget</a> * parent = 0, const char * name = 0 ) :
<a href="ntqdatatable.html">TQDataTable</a>( cursor, autoPopulate, parent, name ) {}
void paintField(
@@ -1505,7 +1505,7 @@ of the calculateField() function since we will be reimplementing it.
{
<a href="qsqlfieldinfo.html">TQSqlFieldInfo</a> productName( "productname", TQVariant::String );
<a href="ntqsqlcursor.html#append">append</a>( productName );
- <a name="x2260"></a> <a href="ntqsqlcursor.html#setCalculated">setCalculated</a>( productName.<a href="qsqlfieldinfo.html#name">name</a>(), TRUE );
+ <a name="x2260"></a> <a href="ntqsqlcursor.html#setCalculated">setCalculated</a>( productName.<a href="qsqlfieldinfo.html#name">name</a>(), true );
}
<a name="x2259"></a>TQVariant InvoiceItemCursor::<a href="ntqsqlcursor.html#calculateField">calculateField</a>( const <a href="ntqstring.html">TQString</a> &amp; name )
@@ -1525,7 +1525,7 @@ of the calculateField() function since we will be reimplementing it.
<a href="ntqsqlfield.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="ntqdatatable.html#addColumn">addColumn</a>( "productname", "Product" );
@@ -1549,15 +1549,15 @@ function require some simple expansion. We'll look at each in turn.
{
<a href="qsqlfieldinfo.html">TQSqlFieldInfo</a> productName( "productname", TQVariant::String );
<a href="ntqsqlcursor.html#append">append</a>( productName );
- <a name="x2264"></a> <a href="ntqsqlcursor.html#setCalculated">setCalculated</a>( productName.<a href="qsqlfieldinfo.html#name">name</a>(), TRUE );
+ <a name="x2264"></a> <a href="ntqsqlcursor.html#setCalculated">setCalculated</a>( productName.<a href="qsqlfieldinfo.html#name">name</a>(), true );
<a href="qsqlfieldinfo.html">TQSqlFieldInfo</a> productPrice( "price", TQVariant::Double );
<a href="ntqsqlcursor.html#append">append</a>( productPrice );
- <a href="ntqsqlcursor.html#setCalculated">setCalculated</a>( productPrice.<a href="qsqlfieldinfo.html#name">name</a>(), TRUE );
+ <a href="ntqsqlcursor.html#setCalculated">setCalculated</a>( productPrice.<a href="qsqlfieldinfo.html#name">name</a>(), true );
<a href="qsqlfieldinfo.html">TQSqlFieldInfo</a> productCost( "cost", TQVariant::Double );
<a href="ntqsqlcursor.html#append">append</a>( productCost );
- <a href="ntqsqlcursor.html#setCalculated">setCalculated</a>( productCost.<a href="qsqlfieldinfo.html#name">name</a>(), TRUE );
+ <a href="ntqsqlcursor.html#setCalculated">setCalculated</a>( productCost.<a href="qsqlfieldinfo.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>