// Insert an item using INSERT SQL statement
CString str;
str.Format(TEXT("INSERT INTO Video (sTitle, sDesc, nHour, nMinute, fRating) VALUES ('%s', '%s', %d, %d, %g)"),
record.m_strTitle,
record.m_strDesc,
record.m_nHour,
record.m_nMinute,
record.m_fRating);
varSQL.bstrVal = SysAllocString(str);
varSQL.vt = VT_BSTR;
hr = m_iADOCERS->Open(varSQL, m_varConn, adOpenDynamic, adLockOptimistic, adCmdUnknown);
PrintHRESULT(hr);
ASSERT(SUCCEEDED(hr));
SysFreeString(varSQL.bstrVal);