SQLRETURN SQLMoreResults(SQLHSTMT StatementHandle);
Le résultat est SQL_SUCCESS en cas de succès.
#include <sqlcli1.h>
static SQLHANDLE hOrdreSql;
static SQL_CHAR Etat[256];
static SQL_INTEGER CodeErreur;
static SQL_CHAR Message[256];
static SQL_INTEGER TailleMessage;
...
if (SQLExecDirect(hOrdreSql, "delete from emp; delete from dept;", SQL_NTS)==SQL_SUCCESS)
{
...
}
...
if (SQLGetDiagRec(SQL_HANDLE_STMT, (SQLHANDLE)hOrdreSql, 1, Etat, &CodeErreur, Message, 256, &TailleMessage)==SQL_SUCCESS)
{
...
}
...
if (SQLMoreResults(SQL_HANDLE_DBC, hConnexion, SQL_ROLLBACK)!=SQL_SUCCESS)
{
...
}
...
if (SQLGetDiagRec(SQL_HANDLE_STMT, (SQLHANDLE)hOrdreSql, 1, Etat, &CodeErreur, Message, 256, &TailleMessage)==SQL_SUCCESS)
{
...
}
...