• To avoid single quoted problems make sure to validate the input. Use of single quotes is a well know SQL inject attack used from hackers. Try replace each single quotes for two single quotes.

    I´m also a brazilian developer and the SQL server date handle provide most os bad time. First if the SQL is installed at us language setting the session language is ineffective. This is a bug of SQL server.

    My personal experience proved reset default server language, set dateformat, set session language and set user language sometimes dont works!

    In addiction for the problems the use of diferent collations at the same database can destroy the simpliest comparation "a" = "a" can be evaluate to false!

    Consider the cenario where u send updates for the customer to create a new table. The SQL server at the customer have a different default collation. Expect for a lot of problems.

    And at end the britanic imperial system default for all US softs is weird.

     

    Jean