CDatabase m_dbCust;
CString strCmd = "UPDATE Taxes SET Federal = 36%";
try
{
m_dbCust.ExecuteSQL( strCmd );
}CATCH(CDBException, e)
{
// The error code is in e->m_nRetCode
}
CString strCmd = "UPDATE Taxes SET Federal = 36%";
try
{
m_dbCust.ExecuteSQL( strCmd );
}CATCH(CDBException, e)
{
// The error code is in e->m_nRetCode
}
pConnection->Execute(...);
_variant_t vtemp;
vtemp.vt = VT_NULL;
pRS->Fields->Item["Weakness"]->Value = vtemp;
....就可以了,我已经试过了。
我没说清楚,我的ado方式是指就是这种item()->value=""的方式,执行sql语句的方法我知道,但是我现在很多程序都是这种方式,如果要改不太现实,而且在ado->add时候,这种比执行insert语句来的清楚和有条理,