Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/2/d43022721/htdocs/clickandbuilds/twmsblog/wp-content/themes/suffusion/functions/media.php on line 666

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/2/d43022721/htdocs/clickandbuilds/twmsblog/wp-content/themes/suffusion/functions/media.php on line 671

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/2/d43022721/htdocs/clickandbuilds/twmsblog/wp-content/themes/suffusion/functions/media.php on line 684

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/2/d43022721/htdocs/clickandbuilds/twmsblog/wp-content/themes/suffusion/functions/media.php on line 689

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/2/d43022721/htdocs/clickandbuilds/twmsblog/wp-content/themes/suffusion/functions/media.php on line 694
Note to self: Do not use double quotes around field names – twm's blog
Dec 222014
 

Note to self:

If MS Access adds double quotes to field names in queries, do not use them!
It won’t complain about them (You’d wish it would), but it just won’t work.

So if you see something like:

SELECT *
FROM t_Mst_Tageserfassung
WHERE ("TeMitarbeiter"=92)  AND ("TeArbeitstag"=#12/24/2014#);

Remove the quotes and it will start to work as expected.

If you need to ensure that the fields are treated as field names, put them into parentheses like this:

SELECT *
FROM t_Mst_Tageserfassung
WHERE ((TeMitarbeiter)=92)  AND ((TeArbeitstag)=#12/24/2014#);

This also works with TAdoQuery in Delphi.

 Posted by on 2014-12-22 at 18:08