1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/sql/qsqlselectcursor.cpp:50 -->
|
---|
3 | <html>
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
6 | <title>QSqlSelectCursor Class</title>
|
---|
7 | <style type="text/css"><!--
|
---|
8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
9 | a:link { color: #004faf; text-decoration: none }
|
---|
10 | a:visited { color: #672967; text-decoration: none }
|
---|
11 | body { background: #ffffff; color: black; }
|
---|
12 | --></style>
|
---|
13 | </head>
|
---|
14 | <body>
|
---|
15 |
|
---|
16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
17 | <tr bgcolor="#E5E5E5">
|
---|
18 | <td valign=center>
|
---|
19 | <a href="index.html">
|
---|
20 | <font color="#004faf">Home</font></a>
|
---|
21 | | <a href="classes.html">
|
---|
22 | <font color="#004faf">All Classes</font></a>
|
---|
23 | | <a href="mainclasses.html">
|
---|
24 | <font color="#004faf">Main Classes</font></a>
|
---|
25 | | <a href="annotated.html">
|
---|
26 | <font color="#004faf">Annotated</font></a>
|
---|
27 | | <a href="groups.html">
|
---|
28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
29 | | <a href="functions.html">
|
---|
30 | <font color="#004faf">Functions</font></a>
|
---|
31 | </td>
|
---|
32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QSqlSelectCursor Class Reference<br><small>[<a href="sql.html">sql module</a>]</small></h1>
|
---|
33 |
|
---|
34 | <p>The QSqlSelectCursor class provides browsing of general SQL
|
---|
35 | SELECT statements.
|
---|
36 | <a href="#details">More...</a>
|
---|
37 | <p><tt>#include <<a href="qsqlselectcursor-h.html">qsqlselectcursor.h</a>></tt>
|
---|
38 | <p>Inherits <a href="qsqlcursor.html">QSqlCursor</a>.
|
---|
39 | <p><a href="qsqlselectcursor-members.html">List of all member functions.</a>
|
---|
40 | <h2>Public Members</h2>
|
---|
41 | <ul>
|
---|
42 | <li class=fn><a href="#QSqlSelectCursor"><b>QSqlSelectCursor</b></a> ( const QString & query = QString::null, QSqlDatabase * db = 0 )</li>
|
---|
43 | <li class=fn><a href="#QSqlSelectCursor-2"><b>QSqlSelectCursor</b></a> ( const QSqlSelectCursor & other )</li>
|
---|
44 | <li class=fn><a href="#~QSqlSelectCursor"><b>~QSqlSelectCursor</b></a> ()</li>
|
---|
45 | </ul>
|
---|
46 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
47 |
|
---|
48 |
|
---|
49 | The QSqlSelectCursor class provides browsing of general SQL
|
---|
50 | SELECT statements.
|
---|
51 | <p>
|
---|
52 |
|
---|
53 | <p> QSqlSelectCursor is a convenience class that makes it possible to
|
---|
54 | display result sets from general SQL <tt>SELECT</tt> statements in
|
---|
55 | data-aware Qt widgets. QSqlSelectCursor is read-only and does not
|
---|
56 | support <tt>INSERT</tt>, <tt>UPDATE</tt> or <tt>DELETE</tt> operations.
|
---|
57 | <p> Pass the query in at construction time, or use the
|
---|
58 | <a href="qsqlquery.html#exec">QSqlSelectCursor::exec</a>() function.
|
---|
59 | <p> Example:
|
---|
60 | <pre>
|
---|
61 | ...
|
---|
62 | QSqlSelectCursor* cur = new QSqlSelectCursor( "SELECT id, firstname, lastname FROM author" );
|
---|
63 | <a href="qdatatable.html">QDataTable</a>* table = new <a href="qdatatable.html">QDataTable</a>( this );
|
---|
64 | table-><a href="qdatatable.html#setSqlCursor">setSqlCursor</a>( cur, TRUE, TRUE );
|
---|
65 | table-><a href="qdatatable.html#refresh">refresh</a>();
|
---|
66 | ...
|
---|
67 | cur-><a href="qsqlquery.html#exec">exec</a>( "SELECT * FROM books" );
|
---|
68 | table-><a href="qdatatable.html#refresh">refresh</a>();
|
---|
69 | ...
|
---|
70 | </pre>
|
---|
71 |
|
---|
72 | <p>See also <a href="database.html">Database Classes</a>.
|
---|
73 |
|
---|
74 | <hr><h2>Member Function Documentation</h2>
|
---|
75 | <h3 class=fn><a name="QSqlSelectCursor"></a>QSqlSelectCursor::QSqlSelectCursor ( const <a href="qstring.html">QString</a> & query = QString::null, <a href="qsqldatabase.html">QSqlDatabase</a> * db = 0 )
|
---|
76 | </h3>
|
---|
77 | Constructs a read only cursor on database <em>db</em> using the query <em>query</em>.
|
---|
78 |
|
---|
79 | <h3 class=fn><a name="QSqlSelectCursor-2"></a>QSqlSelectCursor::QSqlSelectCursor ( const <a href="qsqlselectcursor.html">QSqlSelectCursor</a> & other )
|
---|
80 | </h3> Constructs a copy of <em>other</em>
|
---|
81 | <h3 class=fn><a name="~QSqlSelectCursor"></a>QSqlSelectCursor::~QSqlSelectCursor ()
|
---|
82 | </h3> Destroys the object and frees any allocated resources
|
---|
83 | <!-- eof -->
|
---|
84 | <hr><p>
|
---|
85 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
86 | Copyright © 1995-2007
|
---|
87 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
88 | <table width=100% cellspacing=0 border=0><tr>
|
---|
89 | <td>Copyright © 2007
|
---|
90 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
91 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
92 | </table></div></address></body>
|
---|
93 | </html>
|
---|