SQLRETURN SQLDisconnect(SQLHDBC ConnectionHandle);
Le résultat est SQL_SUCCESS en cas de succès.
#include <windows.h>
#include <sql.h>
#include <sqlext.h>
#include <sqltypes.h>
static SQLHANDLE hConnexion;
...
if (SQLConnect(hConnexion, "nt_sqlserver", SQL_NTS, "scott", SQL_NTS, "tiger", SQL_NTS)!=SQL_SUCCESS)
{
...
}
...
if (SQLDisconnect(hConnexion)!=SQL_SUCCESS)
{
...
}
...