||Re: Update syntax
Mervyn Bick <email@example.com>
||Sat, 13 Feb 2021 10:34:53 +0200
On 2021/02/12 23:25, Tom wrote:
> RevisedCode and RevisedMsgbox attached.
> Pretty sure I tried that before posting. Further suggestions?
My previous message was written just before bedtime. It's a new day and
I'm busy on the second cup of coffee so the old grey mater is churning
The error message is telling you that the value associated with one, or
more, of the fields listed in the SQL statement doesn't match the data
type of the field.
localSQL, as used by dBASE with .dbf files, requires literal dates to be
in American (mm/dd/yyyy) or German (dd.mm.yyyy) format irrespective of
the date setting on the computer. You obviously use the American
setting as the outputs from DTOC() and DTTOC() are both in mm/dd/yyyy
form. A timestamp field will accept any of the following literal
values. '02/12/2021 16:19:27', '02/12/2021 04:17:27PM','02/12/2021
04:17:27pm', '02/12/2021 04:17:27 PM' or '02/12/2021 04:17:27 pm'. In
other words, the values for your date and timestamp filed look OK.
As you have sorted out the two boolean values this leaves the DemoDataID
field as the prime suspect. If this is a character field you will need
to wrap the value in quotes in your UPDATE statement.