From e02e31c8b9d854cd62cbe9799228f6e08e882773 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 5 Dec 2011 22:04:08 -0600 Subject: Sync with latest script --- doc/html/sql.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'doc/html/sql.html') diff --git a/doc/html/sql.html b/doc/html/sql.html index 7be337f7..19db86b6 100644 --- a/doc/html/sql.html +++ b/doc/html/sql.html @@ -145,7 +145,7 @@ your TQt applications. This overview assumes that you have at least a basic knowledge of SQL. You should be able to understand simple SELECT, INSERT, UPDATE and DELETE commands. Although the TQSqlCursor class provides an -interface to database browsing and editing that does not retquire a +interface to database browsing and editing that does not require a knowledge of SQL, a basic understanding of SQL is highly recommended. A standard text covering SQL databases is An Introduction to Database Systems (7th ed.) by C. J. Date, ISBN 0201385902. @@ -222,9 +222,9 @@ for more information).

At least one database connection must be created and opened before the TQSqlQuery or TQSqlCursor classes can be used.

If the application only needs a single database connection, the TQSqlDatabase class can create a connection which is used by default -for all SQL operations. If multiple database connections are retquired +for all SQL operations. If multiple database connections are required these can easily be set up. -

TQSqlDatabase retquires the qsqldatabase.h header file. +

TQSqlDatabase requires the qsqldatabase.h header file.

Connecting to a Single Database

@@ -622,7 +622,7 @@ presented earlier. follows this one we show how to link widgets to database cursors. Once we have a knowledge of both cursors and data-aware widgets we can discuss subclassing TQSqlCursor. -

The TQSqlCursor class retquires the qsqlcursor.h header file. +

The TQSqlCursor class requires the qsqlcursor.h header file.

Retrieving Records

@@ -874,7 +874,7 @@ iteration we call the cursor's primeInsert() method. This method returns a pointer to a TQSqlRecord buffer in which all the fields are set to NULL. (Note that TQSqlCursor::primeInsert() is virtual, and can be customized by derived classes. See TQSqlCursor). Next we -call setValue() for each field that retquires a value. Finally we call +call setValue() for each field that requires a value. Finally we call insert() to insert the record. The insert() call returns the number of rows inserted.

We obtained a pointer to a TQSqlRecord object from the primeInsert() @@ -974,7 +974,7 @@ examples provides additional information. }

From sql/overview/table1/main.cpp

-

Data-Aware tables retquire the qdatatable.h and qsqlcursor.h header +

Data-Aware tables require the qdatatable.h and qsqlcursor.h header files. We create our application object, call createConnections() and create the cursor. We create the TQDataTable passing it a pointer to the cursor, and set the autoPopulate flag to TRUE. Next we make our TQDataTable the main widget and call refresh() to populate it with data @@ -1370,7 +1370,7 @@ leave the loop.

When the user edits the status field in the TQDataTable they will be presented with a combobox of valid status names taken from the status table. However the status displayed is still the raw statusid. To -display the status name when the field isn't being edited retquires us +display the status name when the field isn't being edited requires us to subclass TQDataTable and reimplement the paintField() function.

@@ -1487,7 +1487,7 @@ name of the table. We don't have any other characteristics to add at this stage.

            InvoiceItemCursor invoiceItemCursor;
 
-

Whenever we retquire a cursor over the invoiceitem table we can create +

Whenever we require a cursor over the invoiceitem table we can create an InvoiceItemCursor instead of a generic TQSqlCursor.

We still need to show the product name rather than the pricesid.

@@ -1541,7 +1541,7 @@ name. which perform real calculations.

The header file, sql/overview/subclass4/main.h, remains unchanged from the previous example, but the constructor and calculateField() -function retquire some simple expansion. We'll look at each in turn. +function require some simple expansion. We'll look at each in turn.

    InvoiceItemCursor::InvoiceItemCursor() :
-- 
cgit v1.2.1