Forums
This topic is locked
Update statement ERROR
Posted 16 Jan 2006 17:38:20
1
has voted
16 Jan 2006 17:38:20 andre maas posted:
What's wrong with the following updatestatement?con Execute "UPDATE gbook SET gbookPublish = 1 WHERE gbookPublish = 0"
ERROR = Espected End of Statement!!
I want to update all records in table gbook where value of field gbookPublish = 0
gbookPublish is a YESNO field.
someone? And thanks in advance
Replies
Replied 16 Jan 2006 17:43:11
16 Jan 2006 17:43:11 Wim Conix replied:
Andre,
I guess you have to change it to :
UPDATE gbook SET gbookPublish = 'Yes' WHERE gbookPublish = 'No'
Yes/No and 1/0 are not compatible.
Other direction is to change your gbookPublish field to 0/1 in the database.
Hope this helps,
Wim
I guess you have to change it to :
UPDATE gbook SET gbookPublish = 'Yes' WHERE gbookPublish = 'No'
Yes/No and 1/0 are not compatible.
Other direction is to change your gbookPublish field to 0/1 in the database.
Hope this helps,
Wim
Replied 16 Jan 2006 21:22:39
16 Jan 2006 21:22:39 andre maas replied:
Changed it into YES an NO, but the same error.
ESPECTED: END OF STATEMENT
Taken from the errerpage:
con Execute "UPDATE gbook SET gbookPublish = 'Yes' WHERE gbookPublish = 'No'"
ESPECTED: END OF STATEMENT
Taken from the errerpage:
con Execute "UPDATE gbook SET gbookPublish = 'Yes' WHERE gbookPublish = 'No'"
Replied 16 Jan 2006 21:37:44
16 Jan 2006 21:37:44 andre maas replied:
STUPID PROBLEM!
Forget the DOT in con.Execute
SOLVED.
Thanks anyway.
Forget the DOT in con.Execute
SOLVED.
Thanks anyway.