As a parameter I believe it works (VFP does the conversion for you, I think). But as a value to set, it did not work, IIRC>
Hank
>>I use this successfully with SQL2005 and SQL2008:
>>
>>
>>...
>>lnRet = sqlexec(lnHandle,textmerge([update dFunkyTable set tLastTimeStamped = '<<TTOC(DATETIME(),3>>'])
>>
>>Hank
>>
>Have you tried just sending DATETIME() as the parameter?
>=sqlexec(lnHandle, "UPDATE mytable SET dtField = ?DATETIME() WHERE cid = ?myValue")
>
>works with MySql. I don't have any of the SQL Server versions to test with and am curious if it works there as well.