Changes to fix problems with CF9 and MSSQL 2008

Ok, these changes get the entitytest.cfm to pass for me excluding the lazyload code.