LordQt
17th March 2009, 13:08
Hello friends,
How can I indicate a progressbar during a stored procedure on mssql.
my code is this
void TableEditor::startProc1()
{
QSqlQuery q;
QString stmt="{CALL procName1('05.03.2009','12.03.2009')}";
q.setForwardOnly(true);
q.prepare(stmt);
int i(0);
if(!(i=q.exec()))
{
qCritical()<<q.lastError().text();
}
else if(!q.first())
{
qCritical()<<q.lastError().text();
}
qDebug()<<q.record();
QString strvalue;
strvalue=QString::number(i);
QMessageBox::information(this, tr("Procedure finished"),
tr("Returnvalue: %1 "
" ")
.arg(strvalue));
}
My Procedure on the mssql database takes a few minute and I would implement a visual feddback with a progressbar but don´t know how to implement it with stored procedure??
Have anybody an idea????
How can I indicate a progressbar during a stored procedure on mssql.
my code is this
void TableEditor::startProc1()
{
QSqlQuery q;
QString stmt="{CALL procName1('05.03.2009','12.03.2009')}";
q.setForwardOnly(true);
q.prepare(stmt);
int i(0);
if(!(i=q.exec()))
{
qCritical()<<q.lastError().text();
}
else if(!q.first())
{
qCritical()<<q.lastError().text();
}
qDebug()<<q.record();
QString strvalue;
strvalue=QString::number(i);
QMessageBox::information(this, tr("Procedure finished"),
tr("Returnvalue: %1 "
" ")
.arg(strvalue));
}
My Procedure on the mssql database takes a few minute and I would implement a visual feddback with a progressbar but don´t know how to implement it with stored procedure??
Have anybody an idea????