Some trivial optimizations in ODBC statement preparation code.

Don't use std::ostringstream unnecessarily; reserve space for the query string.