Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

TQSqlSelectCursor Class Reference
[sql module]

The TQSqlSelectCursor class provides browsing of general SQL SELECT statements. More...

#include <tqsqlselectcursor.h>

Inherits TQSqlCursor.

List of all member functions.

Public Members


Detailed Description

The TQSqlSelectCursor class provides browsing of general SQL SELECT statements.

TQSqlSelectCursor is a convenience class that makes it possible to display result sets from general SQL SELECT statements in data-aware TQt widgets. TQSqlSelectCursor is read-only and does not support INSERT, UPDATE or DELETE operations.

Pass the query in at construction time, or use the TQSqlSelectCursor::exec() function.

Example:

    ...
    TQSqlSelectCursor* cur = new TQSqlSelectCursor( "SELECT id, firstname, lastname FROM author" );
    TQDataTable* table = new TQDataTable( this );
    table->setSqlCursor( cur, TRUE, TRUE );
    table->refresh();
    ...
    cur->exec( "SELECT * FROM books" );
    table->refresh();
    ...
    

See also Database Classes.


Member Function Documentation

TQSqlSelectCursor::TQSqlSelectCursor ( const TQString & query = TQString::null, TQSqlDatabase * db = 0 )

Constructs a read only cursor on database db using the query query.

TQSqlSelectCursor::TQSqlSelectCursor ( const TQSqlSelectCursor & other )

Constructs a copy of other

TQSqlSelectCursor::~TQSqlSelectCursor ()

Destroys the object and frees any allocated resources

This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.


Copyright © 2007 TrolltechTrademarks
TQt 3.3.8