I am using an ADODataSet object in C++ Builder 6, and using the SetFields and Post methods to set the values of the fields in the table, and insert the record into it. The last field in the table is a DateTime field. The current version of the code (below) works, but its putting the local PC time into the table records. I want to use CURRENT_TIMESTAMP instead, to store the database server time. I tried just using the constant (like SQL_FN_TD_CURRENT_TIMESTAM
P), I tried it as an AnsiString, both return an exception in the SetFields call. How do I do this?
TADODataSet *dataset = frmADO->ADODataSet11;
DateTimeToString(dt, "mm/dd/yyy hh:mm:ss", Now());
crData.Skill_CD_C, t, TVarRec(dt))));