in reply to Quoted dates in SQL with placeholders

About the only thing I can add here is that you should really revisit your database schema and see that you've not used other troublesome constructs. I don't know what database you are using but I strongly suggest you join a SQL list related to that database. Just for an example - this is something that I got caught up on when I started with PostgreSQL:

SELECT blah FROM blah WHERE name = ?

Since "name" is actually a datatype it's now a reserved word so I would have write that query as:

SELECT blah FROM blah WHERE "name" = ?

At that point you can generally put whatever you want inside of the double quotes (mind you - single quotes are for data, double are for identifiers) including "BiCaps" and "White Space". It gets ugly fast since the use of a feature inside of double-quotes now requires you use it *all* the time. Ugh.

So - re-read your database's documentation and this time look for reserved identifiers. Also join the right mailing list since they'll be able to help so much more than we can.