There is no
SetFieldValue()
function in the
CRecordset
class. You may use
CDatabase::ExecuteSQL()
to add or change field values when the table contains a unique ID:
CString SqlString;
SqlString.Format("UPDATE Truck SET UserName=%s WHERE TruckID=%d",
strName.GetString(), nID);
database.ExecuteSQL(SqlString);
Otherwise, you have derive your own table specific
CRecordset
class, add members for the fields, add the data exchange functions, and use the
AddNew()
,
Edit()
, and
Update()
functions.