summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqsqlerror.3qt
blob: 560069030c6dce610eba71ad3f38e1245c2946f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
'\" t
.TH TQSqlError 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA.  All rights reserved.  See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
TQSqlError \- SQL database error information
.SH SYNOPSIS
\fC#include <tqsqlerror.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "enum \fBType\fR { None, Connection, Statement, Transaction, Unknown }"
.br
.ti -1c
.BI "\fBTQSqlError\fR ( const TQString & driverText = TQString::null, const TQString & databaseText = TQString::null, int type = TQSqlError::None, int number = -1 )"
.br
.ti -1c
.BI "\fBTQSqlError\fR ( const TQSqlError & other )"
.br
.ti -1c
.BI "TQSqlError & \fBoperator=\fR ( const TQSqlError & other )"
.br
.ti -1c
.BI "virtual \fB~TQSqlError\fR ()"
.br
.ti -1c
.BI "TQString \fBdriverText\fR () const"
.br
.ti -1c
.BI "virtual void \fBsetDriverText\fR ( const TQString & driverText )"
.br
.ti -1c
.BI "TQString \fBdatabaseText\fR () const"
.br
.ti -1c
.BI "virtual void \fBsetDatabaseText\fR ( const TQString & databaseText )"
.br
.ti -1c
.BI "int \fBtype\fR () const"
.br
.ti -1c
.BI "virtual void \fBsetType\fR ( int type )"
.br
.ti -1c
.BI "int \fBnumber\fR () const"
.br
.ti -1c
.BI "virtual void \fBsetNumber\fR ( int number )"
.br
.ti -1c
.BI "TQString \fBtext\fR () const"
.br
.ti -1c
.BI "void showMessage ( const TQString & msg = TQString::null ) const  \fI(obsolete)\fR"
.br
.in -1c
.SH DESCRIPTION
The TQSqlError class provides SQL database error information.
.PP
This class is used to report database-specific errors. An error description and (if appropriate) a database-specific error number can be obtained using this class.
.PP
See also Database Classes.
.SS "Member Type Documentation"
.SH "TQSqlError::Type"
This enum type describes the type of SQL error that occurred.
.TP
\fCTQSqlError::None\fR - no error occurred
.TP
\fCTQSqlError::Connection\fR - connection error
.TP
\fCTQSqlError::Statement\fR - SQL statement syntax error
.TP
\fCTQSqlError::Transaction\fR - transaction failed error
.TP
\fCTQSqlError::Unknown\fR - unknown error
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQSqlError::TQSqlError ( const TQString & driverText = TQString::null, const TQString & databaseText = TQString::null, int type = TQSqlError::None, int number = -1 )"
Constructs an error containing the driver error text \fIdriverText\fR, the database-specific error text \fIdatabaseText\fR, the type \fItype\fR and the optional error number \fInumber\fR.
.SH "TQSqlError::TQSqlError ( const TQSqlError & other )"
Creates a copy of \fIother\fR.
.SH "TQSqlError::~TQSqlError ()\fC [virtual]\fR"
Destroys the object and frees any allocated resources.
.SH "TQString TQSqlError::databaseText () const"
Returns the text of the error as reported by the database. This may contain database-specific descriptions.
.SH "TQString TQSqlError::driverText () const"
Returns the text of the error as reported by the driver. This may contain database-specific descriptions.
.SH "int TQSqlError::number () const"
Returns the database-specific error number, or -1 if it cannot be determined.
.SH "TQSqlError & TQSqlError::operator= ( const TQSqlError & other )"
Sets the error equal to \fIother\fR.
.SH "void TQSqlError::setDatabaseText ( const TQString & databaseText )\fC [virtual]\fR"
Sets the database error text to the value of \fIdatabaseText\fR.
.SH "void TQSqlError::setDriverText ( const TQString & driverText )\fC [virtual]\fR"
Sets the driver error text to the value of \fIdriverText\fR.
.SH "void TQSqlError::setNumber ( int number )\fC [virtual]\fR"
Sets the database-specific error number to \fInumber\fR.
.SH "void TQSqlError::setType ( int type )\fC [virtual]\fR"
Sets the error type to the value of \fItype\fR.
.SH "void TQSqlError::showMessage ( const TQString & msg = TQString::null ) const"
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
This is a convenience function that pops up a QMessageBox containing the message returned by text(). An additional string can be passed in via the \fImsg\fR parameter, which will be concatenated with the text() message.
.PP
See also text(), driverText(), and databaseText().
.SH "TQString TQSqlError::text () const"
This is a convenience function that returns databaseText() and driverText() concatenated into a single string.
.PP
See also showMessage(), driverText(), and databaseText().
.SH "int TQSqlError::type () const"
Returns the error type, or -1 if the type cannot be determined.
.PP
See also TQSqlError::Type.

.SH "SEE ALSO"
.BR http://doc.trolltech.com/tqsqlerror.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $TQTDIR/doc/html and can be read using TQt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech. 
.P
If you find errors in this manual page, please report them to
.BR [email protected] .
Please include the name of the manual page (tqsqlerror.3qt) and the Qt
version (3.3.8).