14q.exec(
"call qtestproc (@outval1, @outval2)");
15q.exec(
"select @outval1, @outval2");
17 qDebug() <<
q.value(0) <<
q.value(1);
26query.setForwardOnly(
true);
27query.exec(
"{call STORED_PROC}");
35db.setHostName(
"MyServer");
36db.setDatabaseName(
"C:\\test.gdb");
44q.exec(
"execute procedure my_procedure");
50"QSqlDatabase: QMYSQL driver not loaded \
51QSqlDatabase: available drivers: QMYSQL" \
70query1.
exec(
"select * FROM table1");
71while (query1.
next()) {
75 query2.
exec(
"update table2 set col=2");
87 query.prepare(
"call qtestproc(?, ?)");
The QSqlDatabase class handles a connection to a database.
The QSqlQuery class provides a means of executing and manipulating SQL statements.
bool next()
Retrieves the next record in the result, if available, and positions the query on the retrieved recor...
QVariant value(int i) const
Returns the value of field index in the current record.
void setForwardOnly(bool forward)
Sets forward only mode to forward.
bool exec(const QString &query)
Executes the SQL in query.
int toInt(bool *ok=nullptr) const
Returns the variant as an int if the variant has userType() \l QMetaType::Int, \l QMetaType::Bool,...
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLdouble GLdouble GLdouble GLdouble q